-
Notifications
You must be signed in to change notification settings - Fork 12
/
gatsby-ssr.jsx
55 lines (50 loc) · 1.63 KB
/
gatsby-ssr.jsx
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
48
49
50
51
52
53
54
55
// Import React so that you can use JSX in HeadComponents
const React = require('react');
const HtmlAttributes = {
lang: 'en',
};
const HeadComponents = [
<React.Fragment key='head-1'>
<script
type='module'
src='https://unpkg.com/@jenkinsci/jenkins-io-components?module'
></script>
<script src='https://unpkg.com/@webcomponents/[email protected]/webcomponents-loader.js'></script>
<script src='https://unpkg.com/[email protected]/polyfill-support.js'></script>
<script
data='ionicons'
src='https://cdnjs.cloudflare.com/ajax/libs/ionicons/5.5.2/ionicons/ionicons.esm.js'
type='module'
></script>
<script
data='ionicons'
noModule=''
src='https://cdnjs.cloudflare.com/ajax/libs/ionicons/5.5.2/ionicons/ionicons.js'
></script>
<jio-navbar property='https://contributors.jenkins.io'></jio-navbar>
</React.Fragment>,
];
const BodyAttributes = {};
const PostBodyComponents = [
<React.Fragment key='body-1'>
<script
type='module'
src='https://unpkg.com/@jenkinsci/jenkins-io-components?module'
></script>
<jio-footer property='https://contributors.jenkins.io'></jio-footer>
</React.Fragment>,
];
exports.onRenderBody = (
{
setHeadComponents,
setHtmlAttributes,
setBodyAttributes,
setPostBodyComponents,
},
pluginOptions
) => {
setHtmlAttributes(HtmlAttributes);
setHeadComponents(HeadComponents);
setBodyAttributes(BodyAttributes);
setPostBodyComponents(PostBodyComponents);
};