From 9619bf4fd49a11566381f64f6c6ec2e9ebe87658 Mon Sep 17 00:00:00 2001 From: Aaron Carlino Date: Thu, 14 Nov 2019 16:09:30 +1300 Subject: [PATCH] Offline mode for developer guides --- gatsby-config.js | 11 +++++++---- gatsby-ssr.js | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index e87e61a..db5c429 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -65,9 +65,12 @@ module.exports = { ignore: ['prismjs/','docsearch.js/', 'src/theme/assets/search/algolia.css'], //purgeOnly : ['components/', '/main.css', 'bootstrap/'], } - } - // this (optional) plugin enables Progressive Web App + Offline functionality - // To learn more, visit: https://gatsby.dev/offline - // `gatsby-plugin-offline`, + }, + { + resolve: `gatsby-plugin-offline`, + options: { + precachePages: [`/en/4/developer_guides/*`], + }, + } ], } diff --git a/gatsby-ssr.js b/gatsby-ssr.js index 254f84a..02ea649 100644 --- a/gatsby-ssr.js +++ b/gatsby-ssr.js @@ -8,7 +8,7 @@ exports.wrapPageElement = ({ element, props }) => { exports.onRenderBody = ({ setPostBodyComponents }) => { setPostBodyComponents([