diff --git a/gatsby-config.js b/gatsby-config.js index dc3288f..d690b21 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -72,7 +72,6 @@ module.exports = { resolve: `gatsby-source-filesystem`, options: { name: `watcher`, - // In dev mode, watch all the source files. Otherwise, point it at a meaningless directory path: `${__dirname}/.cache/gatsby-source-git/`, } }, @@ -164,5 +163,14 @@ module.exports = { }, }, `gatsby-plugin-remove-serviceworker`, +<<<<<<< HEAD +======= + // { + // resolve: `gatsby-plugin-offline`, + // options: { + // precachePages: [`/en/4/developer_guides/**`], + // }, + // } +>>>>>>> Remove service worker, fix rendering ], } diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 4be54e1..9cd58e3 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -1,6 +1,7 @@ const React = require('react'); const Layout = require('./src/components/Layout').default; const NodeProvider = require('./src/components/NodeProvider').default; +const { setCurrentPath } = require('./src/utils/nodes'); /** * Applies the node provider (static query of all documents) @@ -16,7 +17,7 @@ exports.wrapPageElement = ({ element, props }) => { ); }; -exports.onRenderBody = ({ setPostBodyComponents, setHeadComponents }) => { +exports.onRenderBody = ({ setPostBodyComponents, setHeadComponents, pathname }) => { // Rules that cannot be touched by purgecss because they come in from client side rendering setHeadComponents([