hl.html - hugo - [fork] hugo port for 9front
(HTM) git clone https://git.drkhsh.at/hugo.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
hl.html (498B)
---
1 {{/* prettier-ignore-start */ -}}
2 {{- /*
3 Returns syntax-highlighted code from the given text.
4
5 This is useful as a terse way to highlight inline code snippets. Calling the
6 highlight shortcode for inline snippets is verbose.
7
8 @example This is {{< hl python >}}inline{{< /hl >}} code.
9 */ -}}
10 {{/* prettier-ignore-end */ -}}
11 {{- $code := .Inner | strings.TrimSpace }}
12 {{- $lang := or (.Get 0) "go" }}
13 {{- $opts := dict "hl_inline" true "noClasses" true }}
14 {{- transform.Highlight $code $lang $opts }}