-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-ssr.js
47 lines (44 loc) · 1.06 KB
/
gatsby-ssr.js
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
39
40
41
42
43
44
45
46
47
const React = require("react");
const GlobalLayout = require("./src/components/Layouts/GlobalLayout").default;
exports.wrapPageElement = ({ element, props }) => {
return (
<GlobalLayout {...props}>{element}</GlobalLayout>
);
};
exports.onRenderBody = ({ setHeadComponents, setHtmlAttributes }) => {
setHtmlAttributes({ lang: "pl" })
setHeadComponents([
<link
rel="preload"
href="/fonts/RobotoCondensed-Regular.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
<link
rel="preload"
href="/fonts/RobotoCondensed-Light.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
<link
rel="preload"
href="/fonts/RobotoCondensed-Bold.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
<link
rel="preload"
href="/fonts/NocturneSerif-Regular.woff2"
as="font"
type="font/woff2"
crossOrigin="anonymous"
key="interFont"
/>,
])
}