forked from ethereum/ethereum-org-website
-
Notifications
You must be signed in to change notification settings - Fork 6
/
gatsby-ssr.tsx
38 lines (35 loc) · 818 Bytes
/
gatsby-ssr.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
import React from "react"
import type { RenderBodyArgs } from "gatsby"
export const onRenderBody = ({ setHeadComponents }: RenderBodyArgs) => {
setHeadComponents([
<link
rel="preload"
href="/fonts/Inter-Regular.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
<link
rel="preload"
href="/fonts/Inter-Regular.woff"
as="font"
type="font/woff"
crossOrigin="anonymous"
key="interFont"
/>,
<link
rel="preload"
href="/fonts/IBMPlexMono-Regular.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
])
}