diff options
author | Darius Lupsa <dariuslupsa@protonmail.com> | 2021-05-08 00:16:51 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-09-10 18:03:59 +0300 |
commit | f03421274f12e3e5f7d24646184326326c6d45c1 (patch) | |
tree | b6058e067f1d91c5cde549e9a3137a3963b9053e | |
parent | 4f0755683cf94498d2b7f205a459800d611f1557 (diff) |
docs: Escaping Hugo/GO template code
Short example how to escape Hugo/GO template code used in a highlight shortcode.
Fixes: #1422
-rw-r--r-- | content/en/content-management/syntax-highlighting.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/content/en/content-management/syntax-highlighting.md b/content/en/content-management/syntax-highlighting.md index 8ff270c54..5195b8211 100644 --- a/content/en/content-management/syntax-highlighting.md +++ b/content/en/content-management/syntax-highlighting.md @@ -80,6 +80,20 @@ func GetTitleFunc(style string) func(s string) string { } {{< / highlight >}} +## Highlight Hugo/GO Template Code + +For highlighting Hugo/GO template code on your page, add `/*` after the opening double curly braces and `*/` before closing curly braces. + +``` go +{{</*/* myshortcode */*/>}} +``` + +Gives this: + +``` go +{{</* myshortcode */>}} +``` + ## Highlight Template Func See [Highlight](/functions/highlight/). |