Small improvments to math feature.

This commit is contained in:
Fredrik Jonsson 2026-04-01 11:24:17 +02:00
commit d596cb6c26
2 changed files with 2 additions and 4 deletions

View file

@ -903,6 +903,7 @@ Lorem {{< math >}}E=mc^2{{< /math >}} ipsum
`[ \int_0^1 \frac{dx}{e^x} = \frac{e-1}{e} ]`
`~~~~`
Read more about this in Hugo docs [Mathematics in Markdown](https://gohugo.io/content-management/mathematics/).
## Getting help

View file

@ -1,7 +1,4 @@
{{ $opts := dict "minify" true -}}
{{ if eq hugo.Environment "development" -}}
{{ $opts = merge $opts (dict "minify" false) -}}
{{ end -}}
{{ $opts := dict "minify" (cond hugo.IsDevelopment false true) -}}
{{ if or ($.Param "math") (.Page.Store.Get "math") (.HasShortcode "math") -}}
<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}">
<script defer src="{{ "katex/katex.min.js" | relURL }}"></script>