gethyas / doks

Everything you need to build a stellar documentation website. Fast, accessible, and easy to use.
https://getdoks.org
MIT License
1.99k stars 352 forks source link

The styling of the <code></code> don't appear after building the site #1106

Open Marco5dev opened 9 months ago

Marco5dev commented 9 months ago

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 6 months ago

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 5 months ago

Looks like PurgeCSS (PostCSS) runs before Hugo transforms Markdown to HTML.

Adding 'code' to the safelistsection of purgecss should fix this