How to toggle the syntax highlight theme #1075
-
How would you switch the code syntax highlight theme when toggling dark/light mode? I've tried adding various snippets of code found online to layouts/partials/extend_head.html and generating chroma style css files for dark and light themes but it never seems to work. Any ideas? Here's some of the things I've been trying: Here's the blog post I'm trying it on and its repo |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Ah, I've found a PaperMod based blog that implemented what I need and included some instructions https://github.com/jimangel/jimangel.io#update-code-syntax-css |
Beta Was this translation helpful? Give feedback.
-
@adityatelange Can you share how you've made the giscus theme toggle on your blog when you switch dark/light mode? Looks really nice! |
Beta Was this translation helpful? Give feedback.
Ah, I've found a PaperMod based blog that implemented what I need and included some instructions
https://github.com/jimangel/jimangel.io#update-code-syntax-css