{{- $reveal_location := $.Param "reveal_hugo.reveal_cdn" | default "reveal-js" -}} {{- $plugins := partial "internal/plugins" . -}} {{ $pluginNames := slice }} {{- range $plugins }} {{ $pluginNames = $pluginNames | append .name }} {{- end -}} {{/* check if we need to load mermaid and its render trick. mermaid is not rendered correctly in reveal if we don't hook to the slidechanged event. (mermaid viewBox element has wrong sizes). manage hot-reload by using the reveal ready event. */}} {{ $hasMermaid := false }} {{ $hasMath := false }} {{ range .Site.AllPages }} {{ if .Store.Get "hasMermaid" }} {{ $hasMermaid = true }} {{ end }} {{ if or .Params.math (.Store.Get "hasMath") }} {{ $hasMath = true }} {{ end }} {{ end }} {{ if $hasMermaid }} {{ $mermaidSrc := resources.GetRemote "https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js" }} {{ end }} {{ if $hasMath }} {{ $mathjaxSrc := resources.GetRemote "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js" }} {{ end }} {{- $custom_js := $.Param "reveal_hugo.custom_js" -}} {{- if $custom_js -}} {{- end -}}