Closed Vantablack closed 3 years ago
You are right. PurgeCSS does not see used .prose classes during build, as it only checks the layout template files. In these the markdown is not build yet., thus no classes to spare from purging.
I changed the postcss-purgecss extractor to the one used in the Hugo docs.
Please try out branch verify-issue28 and see if it works. At least it does on my machine™.
@dirkolbrich That was a really fast fix! Yes, following the Hugo docs on PostProcess did the trick!
I also realised that the parent repo needs to have the writeStats
option turned on too?
Yes, it does. I added this option to /exampleSite.config.toml
. Should mention it in the Readme.
@dirkolbrich Got it! Thank you so much for solving it so quickly!
Issue Description
I found an issue where PurgeCSS is removing @tailwindcss/typography classes.
I think there are other CSS classes that are not included.
I compiled the
public
site using this commandhugo -s exampleSite --themesDir=../..
.What seems to work?
postcss.config.js
removing this line from postcss.config.js works, but I get a large CSS file.
Adding a
div
with classprose
withblockquote
as it's child preventblockquote
CSS from being purged.How to Resolve?
It seems like
postcss.config.js
needs to be edited to whitelistprose
classes, however I am not familiar with it and am still trying to figure out how to solve it.In the meantime I'll leave this information here in case the author/anyone out there has a solution.