Correct the sample code of mermaid (#2119)

This commit is contained in:
Mitch Wu 2023-06-28 22:58:30 +08:00 committed by GitHub
parent a4818d99b2
commit a54bf4cd0c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,9 +47,9 @@ Will be rendered as:
Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`: Hugo currently does not provide default templates for Mermaid diagrams. But you can easily add your own. One way to do it would be to create `layouts/_default/_markup/render-codeblock-mermaid.html`:
```go-html-template ```go-html-template
<div class="mermaid"> <pre class="mermaid">
{{- .Inner | safeHTML }} {{- .Inner | safeHTML }}
</div> </pre>
{{ .Page.Store.Set "hasMermaid" true }} {{ .Page.Store.Set "hasMermaid" true }}
``` ```