Discourse standard {{ printf "discourse Hello %s -> %s" $World .}}
{{- /* just a simple comment */ -}}
<div class="help"/>
{{ range $k, $v := hugo.Generator $ $.Method -}}
{{ site.Language.Label }}
{{ hugo.Sites.Pages }}
Highlight.js Grammars Support for:
Hugo and Go templates Html and Text templates Full coverage of:
Template keywords Built-in functions Aliases Improved automatic language detection
Advanced highlighting scopes
Prebuilt browser bundle for immediate use
Discourse Integration Theme components built on the provided grammars Enables proper syntax highlighting in Discourse environments Download Packages can be downloaded from: Releases ] .
As of now we do not publish anything to a CDN.
Documentation Each artifact includes its own README.md with usage instructions.
Build from Source Build scripts are included to generate all artifacts. These scripts are tailored to the project’s internal workflow and environment and not intended as a general-purpose build system.
Development Environment is a Windows 11 Professional with a recent Powershell Core installation.
Components that have to be there
Powershell Core Hugo ≥ v0.163.3 Go ≥ 1.26.3 Node 22.14.0 (highlight.js requirement) Components automatically pulled by the build script
Highlight.js 11.11.1 (as a clone) hugoDocs (as a hugo module) Build all
git clone https://github.com/irkode/highlightjs-hugo/ highlightjs-hugo
Set-Location highlightjs-hugo
.\build.ps1 -Verbose Build results are in /release.
Notes Scripts are optimized for the current development setup Custom Highlight.js builds should use standard Node/npm tooling after module generation Support Feedback, issues, and ideas are welcome
https://github.com/irkode/highlightjs-hugo/issues
Hugo as a Generator Hugo is used as a general-purpose generation engine to:
Extract functions and aliases from hugoDocs
Generate keyword tables
Build grammar modules and JavaScript libraries
Generate tests
Create Discourse plugins
Produce documentation and README files
Take it as a nifty but hacky showcase to use Hugo as a generic templating and publishing engine – extended beyond static WEB web sites.
If you want to dig in, here’s the source: https://github.com/irkode/highlightjs-hugo/tree/main/hugen
License Code: MIT License (see License ) Assets (logos, images, etc.): © 2026 Irkode (not MIT licensed) Licenses for foreign assets may be different:
Highlight.js icon: © 2006, Ivan Sagalaev. (BSD-Clause-3) Hugo borrowed styles: © Hugo Authors (Apache-2.0) Author References