Preload the fonts the design actually uses
The document still preloaded the Archivo file the old design used, which is now gone: a 404 on every page load. It preloads Playfair Display and Plus Jakarta Sans instead, and the asset test names a font that exists.
This commit is contained in:
1 parent
b13042f0db
commit
b6f05f6828
2 files changed
+9
-2
No files matched your search
@@ -34,7 +34,14 @@ export function renderDocument(input: DocumentInput): Html {
|
||||
<link rel="icon" href="${logo}" />
|
||||
<link
|
||||
rel="preload"
|
||||
href="/assets/fonts/archivo-latin.woff2"
|
||||
href="/assets/fonts/playfair-display-latin.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin
|
||||
/>
|
||||
<link
|
||||
rel="preload"
|
||||
href="/assets/fonts/plus-jakarta-sans-latin.woff2"
|
||||
as="font"
|
||||
type="font/woff2"
|
||||
crossorigin
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ describe('site furniture', () => {
|
||||
const css = await app.inject({ method: 'GET', url: '/assets/styles.css' });
|
||||
assert.equal(css.statusCode, 200);
|
||||
assert.match(css.headers['content-type'] ?? '', /text\/css/);
|
||||
const font = await app.inject({ method: 'GET', url: '/assets/fonts/archivo-latin.woff2' });
|
||||
const font = await app.inject({ method: 'GET', url: '/assets/fonts/playfair-display-latin.woff2' });
|
||||
assert.equal(font.statusCode, 200);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user