diff --git a/content/en/configuration/output-formats.md b/content/en/configuration/output-formats.md index 53bfd5b94..a42ef313e 100644 --- a/content/en/configuration/output-formats.md +++ b/content/en/configuration/output-formats.md @@ -145,7 +145,7 @@ We leave writing the template code as an exercise for you. Aim for a result simi To access output formats, each `Page` object provides two methods: [`OutputFormats`] (for all formats, including the current one) and [`AlternativeOutputFormats`]. Use `AlternativeOutputFormats` to create a link `rel` list within your site's `head` element, as shown below: ```go-html-template -{{ range .AlternativeOutputFormats -}} +{{ range .AlternativeOutputFormats }} {{ end }} ``` diff --git a/content/en/content-management/diagrams.md b/content/en/content-management/diagrams.md index e90a7e213..b771779a8 100644 --- a/content/en/content-management/diagrams.md +++ b/content/en/content-management/diagrams.md @@ -44,16 +44,16 @@ Hugo does not provide a built-in template for Mermaid diagrams. Create your own [code block render hook]: /render-hooks/code-blocks/ -```go-html-template {file="layouts/_default/_markup/render-codeblock-mermaid.html"} +```go-html-template {file="layouts/_default/_markup/render-codeblock-mermaid.html" copy=true}
- {{- .Inner | htmlEscape | safeHTML }} + {{ .Inner | htmlEscape | safeHTML }}{{ .Page.Store.Set "hasMermaid" true }} ``` -And then include this snippet at the _bottom_ of the content template, before the closing `body` tag: +Then include this snippet at the _bottom_ of your base template, before the closing `body` tag: -```go-html-template +```go-html-template {file="layouts/_default/baseof.html" copy=true} {{ if .Store.Get "hasMermaid" }}