We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6d9477 commit f23301bCopy full SHA for f23301b
layouts/partials/scripts/mermaid.html
@@ -1,7 +1,7 @@
1
{{ $version := .Site.Params.mermaid.version | default "latest" -}}
2
3
{{ $cdnurl := printf "https://cdn.jsdelivr.net/npm/mermaid@%s/dist/mermaid.esm.min.mjs" $version -}}
4
-{{ with resources.GetRemote $cdnurl -}}
+{{ with try (resources.GetRemote $cdnurl) -}}
5
{{ with .Err -}}
6
{{ errorf "Could not retrieve mermaid script from CDN. Reason: %s." . -}}
7
{{ end -}}
0 commit comments