-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-browser.tsx
31 lines (27 loc) · 948 Bytes
/
gatsby-browser.tsx
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
import * as React from "react";
import { Script } from "gatsby";
import { GatsbyBrowser } from "gatsby";
import { Prism } from "prism-react-renderer";
import RootLayout from "./src/components/Layout/Root";
import ThemeProvider from "./src/components/Theme/Provider";
import "./fonts/fonts.css";
import "./src/styles/index.css";
import "katex/dist/katex.min.css";
(typeof global !== "undefined" ? global : window).Prism = Prism;
export const wrapPageElement: GatsbyBrowser["wrapPageElement"] = ({
element,
}) => {
return (
<>
<ThemeProvider>
<RootLayout>{element}</RootLayout>
</ThemeProvider>
<Script
src="https://cdnjs.cloudflare.com/ajax/libs/prism/9000.0.1/components/prism-python.min.js"
integrity="sha512-3qtI9+9JXi658yli19POddU1RouYtkTEhTHo6X5ilOvMiDfNvo6GIS6k2Ukrsx8MyaKSXeVrnIWeyH8G5EOyIQ=="
crossOrigin="anonymous"
referrerPolicy="no-referrer"
/>
</>
);
};