summaryrefslogtreecommitdiff
path: root/themes/conspiracy/layouts
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2025-07-26 14:24:12 +0200
committerjaseg <git@jaseg.de>2025-07-26 14:24:12 +0200
commit338de75fb45b861510e99a8271724fd00f2b023e (patch)
treefcfd4dd9385cc5a0834c41b59a19e8347e9965b5 /themes/conspiracy/layouts
parent9d55ae84a8208abd714d6b35bd31b023e4ee2ce5 (diff)
downloadblog-338de75fb45b861510e99a8271724fd00f2b023e.tar.gz
blog-338de75fb45b861510e99a8271724fd00f2b023e.tar.bz2
blog-338de75fb45b861510e99a8271724fd00f2b023e.zip
Fix font preloads, add speculative prefetch rules
Diffstat (limited to 'themes/conspiracy/layouts')
-rw-r--r--themes/conspiracy/layouts/_partials/head.html2
-rw-r--r--themes/conspiracy/layouts/baseof.html17
2 files changed, 17 insertions, 2 deletions
diff --git a/themes/conspiracy/layouts/_partials/head.html b/themes/conspiracy/layouts/_partials/head.html
index c82f260..026a312 100644
--- a/themes/conspiracy/layouts/_partials/head.html
+++ b/themes/conspiracy/layouts/_partials/head.html
@@ -9,7 +9,7 @@
{{- $stylesheet := resources.Get "css/style.css" | resources.ExecuteAsTemplate "style.css" . }}
<link rel="stylesheet" href="{{ $stylesheet.RelPermalink }}">
- <link rel="preload" href="{{ (resources.Get "fonts/roboto_slab/RobotoSlab-VariableFont_wght.ttf").RelPermalink }}" as="font" type="font/woff2" crossorigin />
+ <link rel="preload" href="{{ (resources.Get "fonts/roboto_slab/RobotoSlab-VariableFont_wght.ttf").RelPermalink }}" as="font" type="font/ttf" crossorigin />
<link rel="preload" href="{{ (resources.Get "fonts/nyght-serif-main/fonts/WEB/NyghtSerif-Regular.woff2").RelPermalink }}" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="{{ (resources.Get "fonts/nyght-serif-main/fonts/WEB/NyghtSerif-Bold.woff2").RelPermalink }}" as="font" type="font/woff2" crossorigin />
<link rel="preload" href="{{ (resources.Get "fonts/nyght-serif-main/fonts/WEB/NyghtSerif-BoldItalic.woff2").RelPermalink }}" as="font" type="font/woff2" crossorigin />
diff --git a/themes/conspiracy/layouts/baseof.html b/themes/conspiracy/layouts/baseof.html
index d8ebc93..32a5423 100644
--- a/themes/conspiracy/layouts/baseof.html
+++ b/themes/conspiracy/layouts/baseof.html
@@ -5,11 +5,26 @@
{{- partial "header.html" . -}}
{{- block "main" . }}{{- end }}
{{- partial "footer.html" . -}}
- <script src="/pagefind/pagefind-ui.js" defer></script>
+ <script type="text/javascript" src="/pagefind/pagefind-ui.js" defer></script>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({element: "#search", showSubResults: true});
});
</script>
+ <script type="speculationrules">
+ {
+ "prerender": [
+ {
+ "source": "document",
+ "where": {
+ "and": [
+ {"href_matches": "/*"}
+ ]
+ },
+ "eagerness": "moderate"
+ }
+ ]
+ }
+ </script>
</body>
</html>