Removed unnecessary math.js load

This commit is contained in:
Francesco 2024-04-24 14:53:00 +02:00
parent 7a8bfcb5db
commit 47d23b3afd
4 changed files with 9 additions and 15 deletions

View File

@ -94,6 +94,7 @@ summary: "A search engine overview and Rust implementation."
toc: true toc: true
readTime: true readTime: true
autonumber: true autonumber: true
math: true
--- ---
Your content... Your content...

View File

@ -4,9 +4,6 @@
<head> <head>
{{ partial "head.html" . }} {{ partial "head.html" . }}
{{ if .Param "math" }}
{{ partialCached "math.html" . }}
{{ end }}
</head> </head>
{{ $theme := "auto"}} {{ $theme := "auto"}}
@ -28,7 +25,7 @@
</div> </div>
<footer> <footer>
{{ partial "footer.html" . }} {{ partialCached "footer.html" . }}
</footer> </footer>
</body> </body>
@ -71,7 +68,6 @@
setTheme(); setTheme();
</script> </script>

View File

@ -4,6 +4,9 @@
{{ partialCached "head/css.html" . }} {{ partialCached "head/css.html" . }}
{{ partialCached "head/js.html" . }} {{ partialCached "head/js.html" . }}
{{ if .Param "math" }}
{{ partialCached "math.html" . }}
{{ end }}
{{ if hugo.IsProduction }} {{ if hugo.IsProduction }}
{{ template "_internal/google_analytics.html" . }} {{ template "_internal/google_analytics.html" . }}

View File

@ -1,12 +1,6 @@
{{- with resources.Get "js/main.js" }} {{- with resources.Get "js/main.js" }}
{{- if eq hugo.Environment "development" }}
{{- with . | js.Build }}
<script src="{{ .RelPermalink }}"></script>
{{- end }}
{{- else }}
{{- $opts := dict "minify" true }} {{- $opts := dict "minify" true }}
{{- with . | js.Build $opts | fingerprint }} {{- with . | js.Build $opts | fingerprint }}
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script> <script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- end }}