mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-20 02:17:39 +00:00
theme: Create code block render hook
This commit is contained in:
1 parent
4cdde66496
commit
71d8426ee6
5 files changed
+75
-9
No files matched your search
@@ -32,7 +32,7 @@ For example:
|
||||
|
||||
When using `transform.XMLEscape` in a template rendered by Go's [html/template] package, declare the string to be safe HTML to avoid double escaping. For example, in an RSS template:
|
||||
|
||||
{{< code file="layouts/_default/rss.xml" >}}
|
||||
{{< code file=layouts/_default/rss.xml >}}
|
||||
<description>{{ .Summary | transform.XMLEscape | safeHTML }}</description>
|
||||
{{< /code >}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user