_includes/head: add missing font, and switch to preload for all

Looks like lighthouse doesn't like prefetch for fonts, so switching
to preload. Also adds a missing variant of Geomanist to the list.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-10-16 18:06:03 +02:00
parent d1313056e1
commit 16ea1a8c31
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 6 deletions

View File

@ -47,13 +47,12 @@
{%- comment -%}
preload fonts: https://www.freecodecamp.org/news/web-fonts-in-2018-f191a48367e8/
we only preload the "woff2" variants, as older formats (woff, eot) are only used
by older browsers, and we don't optimize for those. For fontawesome we "prefetch"
to allow the browser to pre-heat the cache, but not load it if the page does not
use it.
by older browsers, and we don't optimize for those.
{%- endcomment -%}
<link rel="prefetch" as="font" href="/fonts/fontawesome-webfont.woff2?v=4.7.0" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/glyphicons-halflings-regular.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Book.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Book.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/geomanist/hinted-Geomanist-Regular.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/glyphicons-halflings-regular.woff2" type="font/woff2" crossorigin="anonymous">
<link rel="preload" as="font" href="/fonts/fontawesome-webfont.woff2?v=4.7.0" type="font/woff2" crossorigin="anonymous">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/bootstrap.min.css">