Document the passthrough render hook's layout

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
pull/2226/head
Johannes Marbach 1 month ago
parent 4a0d7c5a50
commit d0929ef4f0

@ -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") }} {{- $opts := dict "output" "htmlAndMathml" "displayMode" (eq .Type "block") }}
{{- with try (transform.ToMath .Inner $opts) }} {{- with try (transform.ToMath .Inner $opts) }}
{{- with .Err }} {{- with .Err }}

Loading…
Cancel
Save