Syntax Highlighting Defaults? #2298
-
Checklist
How did you create the site?Generated from DescriptionFor example on this github.io page, in the syntax highlighting in the code blocks
I can't seem to change the syntax highlighting for syntax in those formats so I assume it's some kind of default? Operations you have already triedI've played around with css file and looked at the variable definitions but none of them affect the syntax highlighting for those sections of code. Any idea how I can change it? Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Chirpy uses Rouge for syntax highlighting, as specified in |
Beta Was this translation helpful? Give feedback.
-
By default, Chirpy uses a modified version of the base16.dark syntax highlighting style ( If you notice any inconsistencies in the syntax highlighting (which, in some cases, may not be apparent), it is due to the use of two different styles for Dark and Light Modes. To ensure consistency, I recommend using the For example, you might notice inconsistencies when displaying NASM assembly code blocks. Please disregard the colored dots and the JetBrains Mono font: Dark Mode (Chirpy default):Light Mode (Chirpy default):To make the syntax highlighting consistent:
|
Beta Was this translation helpful? Give feedback.
-
I think my issue was similar. I copied/pasted the css theme to the so it just gets overwritten by the default theme base.16.dark-syntax as seen here @tis-starlight has the right advice and if you create a separate custom css file and import that into |
Beta Was this translation helpful? Give feedback.
By default, Chirpy uses a modified version of the base16.dark syntax highlighting style (
rougify style base16.dark
) for Dark Mode and github (rougify style github
) for Light Mode.If you notice any inconsistencies in the syntax highlighting (which, in some cases, may not be apparent), it is due to the use of two different styles for Dark and Light Modes. To ensure consistency, I recommend using the
github
style for Light Mode (which Chirpy already uses) andgithub.dark
for Dark Mode. However, you will need to adjust the styles to match the Chirpy theme.For example, you might notice inconsistencies when displaying NASM assembly code blocks. Please disregard the colored dots and the JetBra…