├── gatsby-config.js ├── .prettierrc ├── src └── pages │ ├── index.css │ └── index.tsx ├── gatsby-ssr.js ├── package.json ├── LICENSE ├── .gitignore ├── SECURITY.md └── README.md /gatsby-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [`gatsby-plugin-typescript`], 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "endOfLine": "lf", 3 | "semi": false, 4 | "singleQuote": false, 5 | "tabWidth": 2, 6 | "trailingComma": "es5" 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/index.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | .App-header { 12 | background-color: #282c34; 13 | min-height: 100vh; 14 | display: flex; 15 | flex-direction: column; 16 | align-items: center; 17 | justify-content: center; 18 | font-size: calc(10px + 2vmin); 19 | color: white; 20 | } 21 | 22 | .App-link { 23 | color: #61dafb; 24 | } 25 | 26 | body, 27 | html, 28 | #___gatsby { 29 | height: 100%; 30 | } 31 | -------------------------------------------------------------------------------- /gatsby-ssr.js: -------------------------------------------------------------------------------- 1 | import { Stylesheet, InjectionMode } from "@uifabric/merge-styles" 2 | import { renderStatic } from "@uifabric/merge-styles/lib/server" 3 | import { renderToString } from "react-dom/server" 4 | import React from "react" 5 | 6 | export const replaceRenderer = ({ 7 | bodyComponent, 8 | replaceBodyHTMLString, 9 | setHeadComponents, 10 | }) => { 11 | const { html, css } = renderStatic(() => { 12 | return renderToString(bodyComponent) 13 | }) 14 | 15 | replaceBodyHTMLString(html) 16 | 17 | setHeadComponents([