While trying to optimize PostCSS workflow, I came across “PostProcess”. It’s great, really makes things smooth!
PurgeCSS with PostProcess uses hugo_stats.json
as given here . In my project, I had some ‘table’ elements like, table
, thead
, tbody
, tr
, th
, and td
. But I could see only table
element in the hugo_stats.json
file. This leads to PurgeCSS not accounting for the styles I have set for td
and th
.
Thoughts? Am I doing something wrong? Thanks in anticipation.
I advise you to use this Bep’s module as a basis. It works really fine.
Someone asked for this. It’s a very basic project, but it should be simple to set up. Please shout if it’s not.
It’s a GitHub template, but I assume it can also be used as a theme/module. Please shout if it cannot.
And may be look at this thread to see if this is your case, and try the Hugo dev version who provide a fix
opened 07:32PM - 28 Sep 20 UTC
closed 08:18PM - 28 Sep 20 UTC
Bug
Outdated
### What version of Hugo are you using (`hugo version`)?
<pre>
$ hugo versio… n
Hugo Static Site Generator v0.75.1/extended darwin/amd64 BuildDate: unknown
</pre>
### Does this issue reproduce with the latest release?
Yes.
- Exemple : `<a href="{{ $url }}" class="missingclass" title="Plus d'information">my text</a>`
- Class `missingclass` not writen in `hugo_stats.json`.
- This also prevent following classes to be treated.
All details are in this thread : https://discourse.gohugo.io/t/template-file-being-ignored-by-writestats/26447/4
1 Like
bep
October 1, 2020, 8:03pm
3
The case you describe is fixed in a Hugo version not so long ago.
2 Likes
Thanks for reply. Running hugo version
outputs:
Hugo Static Site Generator v0.75.1-A4A7BAB7/extended linux/amd64 BuildDate: 2020-09-15T06:57:20Z
Edit: It’s working with v0.75.1. Thanks @bep , @divinerites !
1 Like
system
Closed
October 4, 2020, 11:55am
5
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.