Document the passthrough render hook's layout

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
This commit is contained in:
Johannes Marbach 2025-10-29 14:07:21 +01:00
parent 4a0d7c5a50
commit d0929ef4f0

View file

@ -1,3 +1,13 @@
{{- /*
This is a passthrough render hook (https://gohugo.io/render-hooks/passthrough/).
We use it to send the delimited passthrough element through KaTeX to render maths
in the Olm / Megolm spec.
See: https://gohugo.io/functions/transform/tomath/#step-2
*/ -}}
{{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
{{- with try (transform.ToMath .Inner $opts) }}
{{- with .Err }}