Skip to content

Commit

Permalink
Mermaid diagram with diagram specific settings: fix 'uncaught TypeErr…
Browse files Browse the repository at this point in the history
…or' (#1885)
  • Loading branch information
deining authored Mar 6, 2024
1 parent f37de8d commit b0df3d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/scripts/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return;
}

var params = {{ .Site.Params.mermaid | jsonify | safeJS }};
var params = {{ with .Site.Params.mermaid }}{{ . | jsonify | safeJS }}{{ else }}{}{{- end }};

// Site params are stored with lowercase keys; lookup correct casing
// from Mermaid default config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,18 +388,18 @@ By default, docsy pulls in the latest officially released version of Mermaid at
{{< tab header="Configuration file:" disabled=true />}}
{{< tab header="hugo.toml" lang="toml" >}}
[params.mermaid]
version = "10.8.0"
version = "10.9.0"
{{< /tab >}}
{{< tab header="hugo.yaml" lang="yaml" >}}
params:
mermaid:
version: 10.8.0
version: 10.9.0
{{< /tab >}}
{{< tab header="hugo.json" lang="json" >}}
{
"params": {
"mermaid": {
"version": "10.8.0"
"version": "10.9.0"
}
}
}
Expand Down

0 comments on commit b0df3d9

Please sign in to comment.