yamt

YAMT: Yet Another Minimal Theme for Hugo
git clone https://git.ckiri.com/yamt.git
Log | Files | Refs | LICENSE

render-passthrough.html (481B)


      1 {{- $opts := dict "output" "mathml" "displayMode" (eq .Type "block") }}
      2 {{- with try (transform.ToMath .Inner $opts) }}
      3   {{- with .Err }}
      4     {{- errorf "Unable to render math-markup to HTML using transform.ToMath. KaTeX display engine threw following error: %s: see %s." . $.Position }}
      5   {{- else }}
      6     {{ if eq $opts.displayMode true }}
      7       <div class="math-block">
      8         {{ .Value }}
      9       </div>
     10     {{ else }}
     11       {{- .Value }}
     12     {{ end }}
     13   {{- end }}
     14 {{- end -}}