Choosing code highlight styles


(Dave Higgins) #1

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


(Robin Ward) #2

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.


(Dave Higgins) #3

You mean the category colors?


(Robin Ward) #4

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