File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
layouts/partials/essentials Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change
1
+ # data/fonts.toml
2
+ # List of critical fonts to preload. Paths are relative to the /assets directory.
3
+ files = [
4
+ " fonts/inter-v19-latin-regular.woff2" ,
5
+ " fonts/inter-v19-latin-600.woff2" ,
6
+ " fonts/inter-v19-latin-700.woff2" ,
7
+ " fonts/roboto-slab-v35-latin-700.woff2"
8
+ ]
Original file line number Diff line number Diff line change 64
64
< link rel ="icon " type ="image/png " sizes ="16x16 " href ="/favicon-16x16.png ">
65
65
< link rel ="apple-touch-icon " sizes ="180x180 " href ="/apple-touch-icon.png ">
66
66
< link rel ="icon " type ="image/png " sizes ="32x32 " href ="/favicon-32x32.png ">
67
+ {{/* Preload critical fonts to break the request chain */}}
68
+ {{ range site.Data.fonts.files }}
69
+ {{ with resources.Get . }}
70
+ < link rel ="preload " href ="{{ .RelPermalink }} " as ="font " type ="font/woff2 " crossorigin >
71
+ {{ end }}
72
+ {{ end }}
67
73
68
74
<!-- opengraph and twitter card -->
69
75
{{ partial "components/base-seo.html" . }}
You can’t perform that action at this time.
0 commit comments