-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgatsby-ssr.js
45 lines (44 loc) · 2.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
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* {/* // search-create.js
//<script src={withPrefix('js/google-search.js')} />
//<script src={withPrefix('js/algolia.js')} />
//
//<script src={withPrefix('js/analytics.js')} /> }
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
const React = require("react");
const withPrefix = require("./src/utils/withPrefix").default;
exports.onRenderBody = function ({ setHeadComponents, setPostBodyComponents }) {
setHeadComponents([]);
setPostBodyComponents([
<React.Fragment>
<script src={withPrefix('js/addthis.js')} />
<script src={withPrefix('js/algolia.js')} />
<script src={withPrefix('js/analytics.js')} />
<script src={withPrefix('js/blm.js')} />
<script src={withPrefix('js/docs-main.js')} />
<script src={withPrefix('js/google-search.js')} />
<script src={withPrefix('js/goog-search.js')} />
<script src={withPrefix('js/init.js')} />
<script src={withPrefix('js/inject.js')} />
<script src={withPrefix('js/main.js')} />
<script src={withPrefix('js/misc.js')} />
<script src={withPrefix('js/netlify-identity.js')} />
<script src={withPrefix('js/page-load.js')} />
<script src={withPrefix('js/page-unload.js')} />
<script src={withPrefix('js/plugins.js')} />
<script src={withPrefix('js/prettier.js')} />
<script src={withPrefix('js/print-2-pdf.js')} />
<script src={withPrefix('js/prism.js')} />
<script src={withPrefix('js/searchbar.js')} />
<script src={withPrefix('js/search-create.js')} />
<script src={withPrefix('js/syntax.js')} />
<script src={withPrefix('js/toPlainText.js')} />
<script src={withPrefix('js/ukraine.js')} />
<script src={'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.5/highlight.min.js'} />
<script src={withPrefix('js/syntax.js')} />
</React.Fragment>
]);
};