Once you decide on a hljs theme to use, you can search the dropdown for the one you want and save the setting. You will need to refresh the page in order for everything to start working.
Credits
All of the hljs themes included in this component have copyright information in their respective files. The list of all of those authors () is too big to add here, but you can see them here.
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
This theme is very useful and running in my site for a long time. How ever I suddenly found it has a problem on firefox. The custom css file blocked by the following header X-Content-Type-Options: nosniff. Console shows that css file MIME type is text/html. No matter which theme I choise the problem still happen on firefox but chrome is fine.
So, this means that the current options are going to stay the same for a while. First, the highlight-js version needs to be updated in tests-passed in Discourse. Then we’d need to wait for a stable release. Updating the themes (even the current ones) would put us in a bad state where it’s guesswork whether the theme works properly on your site or not.
This component seems to be broken in the latest betas - highlighting no longer works correctly when it’s installed. I removed the component from the themes and it started working again - I just don’t get to chose the highlighting theme.
It includes an update to highlight.js version 11 themes (core has been updated to highlight.js version 11 too) and fixes for styles missing the correct specificity.
I got this error when I tried to install the component
Error creating upload asset: a11y-dark. Original filename Sorry, the file you are trying to upload is not authorized (authorized extensions: wasm, jpg, jpeg, png, woff, woff2, svg, eot, ttf, otf, gif, webp, avif, js).
Just found this theme component—so glad this exists! I notice that the setting hljs dark match does not seem to work.
For example, we have hljs theme set to atom-one-light (to which there also exists, atom-one-dark).
Upon refreshing, the atom-one-light takes while in dark mode, but the code block does not switch to dark when switching to dark mode—it stays as light.