From 5a534d02b22cf706831beb009b9bb85d76700435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 26 Oct 2023 11:27:53 +0200 Subject: [PATCH] dependencies: fix mermaid and mathjax initialization #682 caused the stylesheet generator to ignore clicks --- layouts/partials/dependencies/mathjax.html | 9 ++++----- layouts/partials/dependencies/mermaid.html | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/layouts/partials/dependencies/mathjax.html b/layouts/partials/dependencies/mathjax.html index ae45a6a182..3b0b0913b4 100644 --- a/layouts/partials/dependencies/mathjax.html +++ b/layouts/partials/dependencies/mathjax.html @@ -1,11 +1,10 @@ {{- $page := .page }} {{- with $page }} + {{- $init := "{}" }} {{- if isset .Params "mathjaxinitialize" }} - {{- $.Scratch.Set "mathJaxInitialize" .Params.mathJaxInitialize }} + {{- $init = .Params.mathJaxInitialize }} {{- else if isset .Site.Params "mathjaxinitialize" }} - {{- $.Scratch.Set "mathJaxInitialize" .Site.Params.mathJaxInitialize }} - {{- else }} - {{- $.Scratch.Set "mathJaxInitialize" "{}" }} + {{- $init = .Site.Params.mathJaxInitialize }} {{- end }} {{- if isset .Params "custommathjaxurl" }} diff --git a/layouts/partials/dependencies/mermaid.html b/layouts/partials/dependencies/mermaid.html index 52567acbb6..8dc42af60a 100644 --- a/layouts/partials/dependencies/mermaid.html +++ b/layouts/partials/dependencies/mermaid.html @@ -17,14 +17,13 @@ {{- else }} {{- end }} + {{- $init := "{}" }} {{- if isset .Params "mermaidinitialize" }} - {{- $.Scratch.Set "mermaidInitialize" .Params.mermaidInitialize }} + {{- $init = .Params.mermaidInitialize }} {{- else if isset .Site.Params "mermaidinitialize" }} - {{- $.Scratch.Set "mermaidInitialize" .Site.Params.mermaidInitialize }} - {{- else }} - {{- $.Scratch.Set "mermaidInitialize" "{}" }} + {{- $init = .Site.Params.mermaidInitialize }} {{- end }} {{- end }} \ No newline at end of file