The styling of the <code></code> don't appear after building the site
Opened this issue · 2 comments
Marco5dev commented
The styling of the don't appear after building the site with npm run build in github workflows and my environment
the the style of
``javascript
// some code here after building it's with no colors
``
and i know I intentionally put two just now
jollydodo commented
I had the same issue which is related to purgecss. Purgecss seems to drop the < code > styling when there is no code block in the index.html file. it is weird, but I messed around with it and adding "< code >< /code >" somewhere in my index.html fixed it on all pages. (drop the spaces)
h-enk commented
Looks like PurgeCSS (PostCSS) runs before Hugo transforms Markdown to HTML.
Adding 'code'
to the safelist
section of purgecss
should fix this