Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Marco5dev opened this issue Oct 2, 2023 · 2 comments
Open

Comments

@Marco5dev
Copy link

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
Copy link

jollydodo commented Dec 21, 2023

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
Copy link
Member

h-enk commented Jan 8, 2024

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

Adding 'code' to the safelist section of purgecss should fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants