{{- $page := .page }} {{- with $page }} {{- if isset .Params "custommermaidurl" }} {{- else if isset .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 }}