diff options
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/baseof.html | 6 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 | ||||
-rw-r--r-- | layouts/partials/head/js.html | 14 |
3 files changed, 8 insertions, 15 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 524af7f..e5ac09e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -4,9 +4,6 @@ <head> {{ partial "head.html" . }} - {{ if .Param "math" }} - {{ partialCached "math.html" . }} - {{ end }} </head> {{ $theme := "auto"}} @@ -28,7 +25,7 @@ </div> <footer> - {{ partial "footer.html" . }} + {{ partialCached "footer.html" . }} </footer> </body> @@ -71,7 +68,6 @@ setTheme(); - </script> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a16d7ea..962ebf4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,6 +4,9 @@ {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }} +{{ if .Param "math" }} +{{ partialCached "math.html" . }} +{{ end }} {{ if hugo.IsProduction }} {{ template "_internal/google_analytics.html" . }} diff --git a/layouts/partials/head/js.html b/layouts/partials/head/js.html index 18fe842..8bae509 100644 --- a/layouts/partials/head/js.html +++ b/layouts/partials/head/js.html @@ -1,12 +1,6 @@ {{- with resources.Get "js/main.js" }} - {{- if eq hugo.Environment "development" }} - {{- with . | js.Build }} - <script src="{{ .RelPermalink }}"></script> - {{- end }} - {{- else }} - {{- $opts := dict "minify" true }} - {{- with . | js.Build $opts | fingerprint }} - <script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> - {{- end }} - {{- end }} +{{- $opts := dict "minify" true }} +{{- with . | js.Build $opts | fingerprint }} +<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> {{- end }} +{{- end }}
\ No newline at end of file |