theme: Preload fonts (#3209)

* theme: Preload fonts

Which, in my tests, removes the layout shifting on the home page.

* Update layouts/_partials/layouts/head/head.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Bjørn Erik Pedersen
2025-09-16 21:43:08 +02:00
committed by GitHub
parent c0271d266a
commit a1566495bf
+3
View File
@@ -12,6 +12,9 @@
{{ .Site.Title }}
</title>
<link rel="preload" href="{{ `fonts/Mulish-VariableFont_wght.ttf` | relURL }}" as="font" type="font/ttf" crossorigin="anonymous" />
<link rel="preload" href="{{ `fonts/Mulish-Italic-VariableFont_wght.ttf` | relURL }}" as="font" type="font/ttf" crossorigin="anonymous" />
<link rel=apple-touch-icon sizes=180x180 href=/apple-touch-icon.png>
<link rel=icon type=image/png href=/favicon-32x32.png sizes=32x32>
<link rel=icon type=image/png href=/favicon-16x16.png sizes=16x16>