From 137ce9228112e4fb7f73cdb5527d210bd45465ba Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:16:33 -0500 Subject: [PATCH 1/6] Comment: Add TODO --- config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.yaml b/config.yaml index 9e8c9285..26be405e 100644 --- a/config.yaml +++ b/config.yaml @@ -1,3 +1,6 @@ +# TODO: Consider renaming this file to "hugo.yaml" in accordance with +# recommendations since v0.109 of Hugo. + disableKinds: - taxonomy theme: From c4a1fa730aa7ef85c86a3d5853404eb70b8f86f8 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:21:44 -0500 Subject: [PATCH 2/6] Comment: Add TODO --- config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config.yaml b/config.yaml index 26be405e..4c5e19d2 100644 --- a/config.yaml +++ b/config.yaml @@ -1,6 +1,10 @@ # TODO: Consider renaming this file to "hugo.yaml" in accordance with # recommendations since v0.109 of Hugo. +# TODO: Consider splitting config into separate files in a "config/" +# directory hierarchy. See +# . + disableKinds: - taxonomy theme: From 9df68e7b3aad51b014041afd8417e9438c3795fa Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:22:11 -0500 Subject: [PATCH 3/6] Add: (config.yaml) Enable math equation rendering passthrough See . --- config.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config.yaml b/config.yaml index 4c5e19d2..2d81ba14 100644 --- a/config.yaml +++ b/config.yaml @@ -13,6 +13,7 @@ params: colorScheme: auto # can be auto (browser setting), light, or dark images: - /images/logo.svg + math: true navColor: blue font: name: "Lato" @@ -20,3 +21,19 @@ params: plausible: dataDomain: null javaScript: "https://views.scientific-python.org/js/script.js" + +# Math equations. +markup: + goldmark: + extensions: + passthrough: + delimiters: + block: + - - \[ + - \] + - - $$ + - $$ + inline: + - - \( + - \) + enable: true From 7c4255f8c256fdfa33c86479b8ffa04704564eff Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:27:48 -0500 Subject: [PATCH 4/6] Add: (layouts/partials/math.html) See . --- layouts/partials/math.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 layouts/partials/math.html diff --git a/layouts/partials/math.html b/layouts/partials/math.html new file mode 100644 index 00000000..99f5b3e3 --- /dev/null +++ b/layouts/partials/math.html @@ -0,0 +1,11 @@ +{{/* See . */}} + + + From 30bd6602948dab6dd90afa3564e4fca0a232c063 Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:31:38 -0500 Subject: [PATCH 5/6] Add: (layouts/_default/baseof.html) Math equation support See . --- layouts/_default/baseof.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index d079e0a3..eb56ff88 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -20,6 +20,11 @@ {{ template "_internal/twitter_cards.html" . }} + + {{/* Math equation support. See . */}} + {{ if .Param "math" }} + {{ partialCached "math.html" . }} + {{ end }} {{ block "navbar" . }} From 59e65c1b6ea8bff6664821119b7d9192277e993c Mon Sep 17 00:00:00 2001 From: Adam Porter Date: Tue, 23 Apr 2024 17:34:02 -0500 Subject: [PATCH 6/6] Remove: (layouts/partials/head.html) Empty file In accordance with the recommendations in , the HTML HEAD content goes in "baseof.html" rather than here, and after removing the old implementation, this file is empty. --- layouts/_default/baseof.html | 3 --- layouts/partials/head.html | 14 -------------- 2 files changed, 17 deletions(-) delete mode 100644 layouts/partials/head.html diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index eb56ff88..4c52e488 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,9 +8,6 @@ {{ partial "css.html" . -}} - - {{ partial "head.html" . -}} - {{ if .IsTranslated }} {{ range .Translations }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html deleted file mode 100644 index a6a20082..00000000 --- a/layouts/partials/head.html +++ /dev/null @@ -1,14 +0,0 @@ -{{ if (findRE `(\$.*\$)|(\\\\\[.*\\\\\])|(\\\\\(.*\\\\\))` .Content) }} - - -{{ end }} -