How to highlight Julia's code on web using Highlight.js

Highlight.js does not seem to support Julia. Does anybody know a workaround to add Julia support. I use blogspot service and a CDN service of highlight.js to stylize Python code, which does not work for Julia since it is not supported.

It does have Julia support, it is just not included in the default bundle. Here is the julia style: https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/julia.min.js and the julia-repl style: https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/julia-repl.min.js

You can also use and improved version available here: Improved syntax highlighting for Julia on the web | Fredrik Ekre (see also Improved syntax highlighting for Julia on the web).

4 Likes