Discourse components
Wrapped HighlightJS grammars in Discourse theme components.
{{ printf "discourse Hello %s -> %s" $World .}}
{{- /* printf "ONE second line */ -}}
<div class="help"/>
{{ range $k, $v := hugo.Generator $ $.Method -}}
{{ site.Language.Label }}
{{ hugo.Sites.Pages }}You don’t have to be that colorful. Adding new wanted styles to your working styles will be a good choice. Have a look at the Discourse Example and Hugo examples to see how it could look like.
Download
Packages can be downloaded from: Releases1.
- Discourse theme components highlightjs-hugo-discourse.zip
Usage
you must have Highlight.js configured in your Instance
create a new Theme Component
either grab a zip from our [Releases][] page and import.
or
download the above zip and just copy the content of the
theme-initializer.gjsto the JS section of your Theme component.To style the custom scopes add your stylesheet to the CSS section.
Discourse Requirements
The theme components are tested in virtual machines hosted on Windows 11 Professional
- Discourse 2026.6.0-latest
- Ubuntu 26.04 Desktop
- Hyper-V
Install a DEV Environment on Windows 11
- Discourse 3.6.0.beta3-latest (end Oct 2025)
- Ubuntu 22.04
- WSL
References:
Support
Feedback, issues2, and ideas are welcome
