I recently added PurgeCSS to a few of my repos. I followed the docs and it worked out swell. (Yes, I’m still catching up to all the new Hugo features ).
But, in case less savvy users wanted to give it try, I wrote a small “from scratch” tutorial that holds your hand along the way.
Thanks for that. I’d like to suggest that you add (time permitting, of course) a section on manually excluding elements/ids/classnames from the purge.
Rationale: There are JS libraries out there that add class names to HTML elements at run time, i.e. after the HTML has been generated. Those classnames would be included in the purge by default (since they seem not to be used), which makes the site behave unexpectedly at run time.
Ok, I’m using this on Netlify and Render too. Works like a charm.
What about cases when sites are served using S3? So, just static files already rendered with a simple hugo command replicated to various servers? I can’t find a solution to this