diff --git a/layouts/partials/layout/javascript.html b/layouts/partials/layout/javascript.html index 72131ef..d6b8f71 100644 --- a/layouts/partials/layout/javascript.html +++ b/layouts/partials/layout/javascript.html @@ -68,15 +68,23 @@ {{ end }} {{ if $hasMermaid }} - {{ $mermaidSrc := resources.GetRemote "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js" }} - - - -{{ $mathjaxSrc := resources.GetRemote "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" }} - + + {{- $mathjax_location := $.Param "reveal_hugo.mathjax_cdn" | default "__fetch_cdn__" -}} + + {{ if eq $mathjax_location "__fetch_cdn__" }} + {{ $mathjax_location := resources.GetRemote "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" }} + + {{ else }} + + {{ end }} {{ end }} {{- $custom_js := $.Param "reveal_hugo.custom_js" -}}