Code block highlighting for forum.cloudron.io in the Cloudron brand colors, with Cloudron-specific tokens in bash and Dockerfile, and hover hints that link to docs.cloudron.io.
Requires NodeBB 4.12+ with nodebb-plugin-markdown (highlighting enabled). NodeBB 3 and older are not supported.
The plugin is not on npm. Install it from GitHub in the NodeBB directory:
npm install cloudron-io/nodebb-plugin-cloudron-codehighlighter
./nodebb activate nodebb-plugin-cloudron-codehighlighter
./nodebb buildThen restart NodeBB. To pin a release, append a tag: cloudron-io/nodebb-plugin-cloudron-codehighlighter#v0.1.0.
In ACP > Plugins > Markdown:
- Default highlight language:
plaintext. Without it, highlight.js guesses a language, and plain English quotes come out asarmasmorsmali. - Keep a light highlight theme selected. The few token types this theme does not style (
hljs-code,hljs-formula) fall back to it.
- A highlight.js theme in Cloudron colors for every language, light and dark mode. Cloudron blue only marks Cloudron things. Every token color meets WCAG AA (4.5:1) in both modes.
- In bash and Dockerfile blocks, marks the
cloudronCLI and its subcommands,cloudron-support,$CLOUDRON_*variables,/app/dataand/app/codepaths,gosu cloudron:cloudron, common server tools andcloudron/baseimages. - Hovering or tapping a marked token shows a short explanation and a
Docs ↗link to the matching docs.cloudron.io section. The code itself has no links, so selecting and copying code works as before. - Adds
dockerfileandnginxhighlighting, andenv,dotenvandconfcode fences (highlighted as ini).
Open an issue with the token and the link it shows in the issue tracker.