highlight
x | highlight(lang=, options=?)Syntax highlighting of the input as lang (Chroma classes, or inline styles per noClasses; needs the site’s highlight configuration).
Arguments#
| Argument | Type | Required |
|---|---|---|
lang | string | yes |
options | any | no |
Details#
- Kind: Filter, implemented by fugo.
- Available in: every kind of template: layouts, partials, shortcodes and render hooks.
- Output: safe HTML, not escaped.
- Site-bound: reads the site or the page being rendered; in a component, pass
page=or declare@__nh.