mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-16 11:54:34 -04:00
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:
parent
4f0755683c
commit
f03421274f
@ -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/).
|
||||
|
Loading…
x
Reference in New Issue
Block a user