Choosing code highlight styles

I understand Discourse uses highlight.js for code highlighting.
How can I change the styles used (e.g. pick a different colour scheme for “cpp”, etc) as demoed on the hjighlight.js site?

Thanks

You’d have to create a custom CSS scheme on Discourse and upload the appropriate file. Our default highlight.js just takes into account the color scheme from the admin panel.

3 Likes

You mean the category colors?

No. Category colors can be customized, but in Admin > Customize > Color Schemes you can choose the base colors of your Discourse. Highlight respects them.

4 Likes