forked from researchdata-sheffield/dataviz-hub2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-ssr.js
27 lines (23 loc) · 913 Bytes
/
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
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.org/docs/ssr-apis/
*/
import React from 'react'
// load scripts
export const onRenderBody = ({ setPostBodyComponents }) => {
setPostBodyComponents([
<script
key="https://cdnjs.cloudflare.com/ajax/libs/trianglify/3.0.0/trianglify.min.js"
src="https://cdnjs.cloudflare.com/ajax/libs/trianglify/3.0.0/trianglify.min.js"
integrity="sha512-rjQcHsP3OLGWVRNiLLBeupOT+luccTXECmZvxA4jc9uZfBr/qkML4uTGqQbypT3YZ5psW9C/SQUolxFjx6mxwg=="
crossOrigin="anonymous"
/>,
<script
key="https://cdnjs.cloudflare.com/ajax/libs/d3/5.16.0/d3.min.js"
src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.16.0/d3.min.js"
integrity="sha512-FHsFVKQ/T1KWJDGSbrUhTJyS1ph3eRrxI228ND0EGaEp6v4a/vGwPWd3Dtd/+9cI7ccofZvl/wulICEurHN1pg=="
crossOrigin="anonymous"
/>
])
}