Code Highlightingscript-free code syntax highlighting with theme support
Using a custom pipeline powered by chroma, your HTML templates can include colorized formatted code, with or without line numbers. Hundreds of languages are supported, and the resulting HTML fragment is formatted for clean markup.
For Markdown files, it’s as easy as including a triple-backtick code block with a language specified. It’s used for this document’s code examples.
go and HTML Templates, you’ll need to either call one of the utility methods and display the unescaped markup, or use the predefined JSON components.
You’ll need to import
views/components at the top of your template.