From d596cb6c260ea5aa3b93a2486d68ec043804320b Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 1 Apr 2026 11:24:17 +0200 Subject: [PATCH] Small improvments to math feature. --- README.md | 1 + layouts/_partials/head/math.html | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 027db37..2312e4a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/layouts/_partials/head/math.html b/layouts/_partials/head/math.html index 51f8b5f..3b8dfaf 100644 --- a/layouts/_partials/head/math.html +++ b/layouts/_partials/head/math.html @@ -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") -}}