From 073191903c305db0c977b8d3e01b96c80805ab3e Mon Sep 17 00:00:00 2001 From: Richard-Qin-X Date: Wed, 9 Sep 2026 14:05:02 +0800 Subject: Add build-time MathML rendering --- layouts/_markup/render-passthrough.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/_markup/render-passthrough.html (limited to 'layouts/_markup/render-passthrough.html') diff --git a/layouts/_markup/render-passthrough.html b/layouts/_markup/render-passthrough.html new file mode 100644 index 0000000..4e4e779 --- /dev/null +++ b/layouts/_markup/render-passthrough.html @@ -0,0 +1,13 @@ +{{- $options := dict + "displayMode" (eq .Type "block") + "output" "mathml" + "strict" "error" + "throwOnError" true +-}} +{{- with try (transform.ToMath .Inner $options) -}} + {{- with .Err -}} + {{- errorf "Unable to render mathematical markup at %s: %s" $.Position . -}} + {{- else -}} + {{- .Value -}} + {{- end -}} +{{- end -}} -- cgit v1.2.3