diff options
author | jaseg <git@jaseg.de> | 2025-07-26 13:45:58 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2025-07-26 13:45:58 +0200 |
commit | 9d55ae84a8208abd714d6b35bd31b023e4ee2ce5 (patch) | |
tree | cd39a0c3fb58fef8c7e9d70731798cb107498b8d | |
parent | 322eddf574e8b5bd01f0b5ce553bafa6ce10a774 (diff) | |
download | blog-9d55ae84a8208abd714d6b35bd31b023e4ee2ce5.tar.gz blog-9d55ae84a8208abd714d6b35bd31b023e4ee2ce5.tar.bz2 blog-9d55ae84a8208abd714d6b35bd31b023e4ee2ce5.zip |
Improve performance by preloading webfonts
-rw-r--r-- | content/blog/thors-hammer/index.rst | 4 | ||||
-rw-r--r-- | themes/conspiracy/layouts/_partials/head.html | 6 | ||||
-rw-r--r-- | themes/conspiracy/layouts/baseof.html | 9 |
3 files changed, 11 insertions, 8 deletions
diff --git a/content/blog/thors-hammer/index.rst b/content/blog/thors-hammer/index.rst index d81287a..650716e 100644 --- a/content/blog/thors-hammer/index.rst +++ b/content/blog/thors-hammer/index.rst @@ -1,6 +1,10 @@ --- title: "Thor's Hammer" date: 2018-05-03T11:59:37+02:00 +summary: > + In case you were having an inferiority complex because your friends' IBM Model M keyboards are so much louder than + the shitty rubber dome freebie you got with your pc... Here's the solution: Thor's Hammer, a simple typing cadence + enhancer for PS/2 keyboards. --- In case you were having an inferiority complex because your friends' IBM Model M keyboards are so much louder than the diff --git a/themes/conspiracy/layouts/_partials/head.html b/themes/conspiracy/layouts/_partials/head.html index 1196d00..c82f260 100644 --- a/themes/conspiracy/layouts/_partials/head.html +++ b/themes/conspiracy/layouts/_partials/head.html @@ -5,6 +5,12 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="mobile-web-app-capable" content="yes"> <meta name="color-scheme" content="dark light"> + {{- $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/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 /> </head> diff --git a/themes/conspiracy/layouts/baseof.html b/themes/conspiracy/layouts/baseof.html index 9557f19..d8ebc93 100644 --- a/themes/conspiracy/layouts/baseof.html +++ b/themes/conspiracy/layouts/baseof.html @@ -5,15 +5,8 @@ {{- partial "header.html" . -}} {{- block "main" . }}{{- end }} {{- partial "footer.html" . -}} - <script src="/pagefind/pagefind-ui.js"></script> + <script src="/pagefind/pagefind-ui.js" defer></script> <script> - if(navigator.getEnvironmentIntegrity!==undefined)document.querySelector('body').innerHTML=`<h1>Your browser - contains Google DRM</h1>"Web Environment Integrity" is a Google euphemism for a DRM that is designed to - prevent ad-blocking, and which Google has forced into their browsers against widespread public opposition. - In support of an open web, this website does not function with this DRM. Please install a browser such - as <a href="https://www.mozilla.org/en-US/firefox/new/">Firefox</a> that respects your freedom and supports - ad blockers.`; - window.addEventListener('DOMContentLoaded', (event) => { new PagefindUI({element: "#search", showSubResults: true}); }); |