thuliteio / doks

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

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

Open Marco5dev opened 1 year ago

Marco5dev commented 1 year 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 11 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 10 months ago

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

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