summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco <tomaselli.fr@gmail.com>2024-04-24 14:53:00 +0200
committerFrancesco <tomaselli.fr@gmail.com>2024-04-24 14:53:00 +0200
commit29e90e8ac131a181ea0acd5a21faa643109e1cbc (patch)
treeccbd6484648e61d3f1e3ffcef36e82b1b71e045c
parent4652e8aa97bed57ac468ef6eae6d66365ac740e0 (diff)
Removed unnecessary math.js load
-rw-r--r--README.md1
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/partials/head.html3
-rw-r--r--layouts/partials/head/js.html14
4 files changed, 9 insertions, 15 deletions
diff --git a/README.md b/README.md
index 080539d..5cf3887 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,7 @@ summary: "A search engine overview and Rust implementation."
toc: true
readTime: true
autonumber: true
+math: true
---
Your content...
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