-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-ssr.js
42 lines (37 loc) · 1.01 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
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/
*/
const React = require("react");
/**
* @type {import('gatsby').GatsbySSR['onRenderBody']}
*/
exports.onRenderBody = ({ setHtmlAttributes, setHeadComponents }) => {
setHtmlAttributes({ lang: `zh-CN` });
// Noto Sans SC
setHeadComponents([
<link
href="https://static.zeoseven.com/zsft/69/main/result.css"
rel="stylesheet"
crossOrigin="anonymous"
key="NotoSansFont"
/>,
]);
// setHeadComponents([
// <link
// href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-screen-webfont@1.7.0/style.css"
// rel="stylesheet"
// crossOrigin="anonymous"
// key="LxgwWenkaiFont"
// />,
// ]);
// setHeadComponents([
// <link
// href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css"
// rel="stylesheet"
// crossOrigin="anonymous"
// key="katexStyle"
// />,
// ]);
};