From e55fd333c9d1afabf5a4818eaf925cf31f677975 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 17 Oct 2023 18:54:19 -0400 Subject: themes/default/layouts/_default/_markup: Support MathML --- .../_default/_markup/render-codeblock-mathml.html | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 themes/default/layouts/_default/_markup/render-codeblock-mathml.html (limited to 'themes/default/layouts/_default') diff --git a/themes/default/layouts/_default/_markup/render-codeblock-mathml.html b/themes/default/layouts/_default/_markup/render-codeblock-mathml.html new file mode 100644 index 0000000..62ce0e8 --- /dev/null +++ b/themes/default/layouts/_default/_markup/render-codeblock-mathml.html @@ -0,0 +1,18 @@ +{{- $caption := default "Math Render" .Attributes.caption -}} +{{- $ordinal := add .Ordinal 1 -}} +{{- $hash := print (truncate 3 "" (sha256 .Inner)) (truncate 3 "" (sha256 .Page.RelPermalink)) "-" $ordinal -}} +{{- $id := print "math:" $hash | safeURL -}} + + +
+
+ {{- with $math := .Inner -}} + {{- $math | safeHTML -}} + {{- end -}} +
+
+ {{ $ordinal }} + {{ $caption | markdownify }} +
+
+
-- cgit v1.2.3