docs: Escaping Hugo/GO template code

Short example how to escape Hugo/GO template code used in a highlight shortcode.

Fixes: #1422
This commit is contained in:
Darius Lupsa 2021-05-08 00:16:51 +03:00 committed by Bjørn Erik Pedersen
parent 4f0755683c
commit f03421274f

View File

@ -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/).