{{- $page := .page }} {{- with $page }} {{- if and (isset .Params "custommermaidurl") .Params.customMermaidURL }} {{- else if and (isset .Site.Params "custommermaidurl") .Site.Params.customMermaidURL }} {{- else }} {{- end }} {{- $init := "{}" }} {{- if isset .Params "mermaidinitialize" }} {{- $init = .Params.mermaidInitialize }} {{- else if isset .Site.Params "mermaidinitialize" }} {{- $init = .Site.Params.mermaidInitialize }} {{- end }} {{- end }}