Hi there! I saw your message about building a theme component from a fork of HighlightJS. I am hoping to do something similar for the Modular forum to add syntax highlighting for Mojo and I was wondering if you might be able to share any instructions or point me in the right direction? Thanks so much! ![]()
AI-generated summary
Creating a Theme Component from HighlightJS Script: CarolineFrasca is seeking to create a theme component to add syntax highlighting for Mojo on the Modular forum, referencing a previous discussion on building a theme component from a fork of HighlightJS. Falco responds by providing a ready-to-use theme component, discourse-highlightjs-mojo, with installation instructions. CarolineFrasca expresses gratitude for Falco’s assistance. The installation process involves adding the component to the main theme and including “mojo” in the Highlighted languages site setting.
Hey @CarolineFrasca, here is a theme-component wrapping your work and ready to use on Discourse. You can fork it, or use as it is.
https://github.com/discourse/discourse-highlightjs-mojo
It will look like this currently:
The install instructions are the same as every theme component
- Install it under admin > customize
- Add it to your main theme
- Add “mojo” to the site setting
Highlighted languages.
Oh my goodness, thank you so much!! I really, really appreciate this! Amazing.
