Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mermaid diagram with diagram specific settings: fix 'uncaught TypeError' #1885

Merged
merged 1 commit into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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