From 6181fec71fa08cfa64d81fb777bac5fbc80205bb Mon Sep 17 00:00:00 2001 From: Hippo Date: Sun, 29 Mar 2020 18:00:13 +0530 Subject: [PATCH] Add hack files to trick Gatsby into reloading itself Otherwise it keeps on trying to load Gatsby pages (and not finding them because we've switched to Gridsome). --- static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js | 2 ++ static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map | 1 + static/page-data/404.html/page-data.json | 1 + 3 files changed, 4 insertions(+) create mode 100644 static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js create mode 100644 static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map create mode 100644 static/page-data/404.html/page-data.json diff --git a/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js b/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js new file mode 100644 index 0000000..c29d55f --- /dev/null +++ b/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js @@ -0,0 +1,2 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{253:function(e,t,a){"use strict";a.r(t);var n=a(0),c=a.n(n),s=a(4),o=a(245);t.default=function(){return c.a.createElement(o.b,null,c.a.createElement("div",{className:"container"},c.a.createElement("article",{className:"content",style:{textAlign:"center"}},c.a.createElement("h1",{className:"content-title"},"Site Updated"),c.a.createElement("section",{className:"content-body"},"This website has been updated. ",c.a.createElement(s.Link,{to:"/"},"Reload the page")," to continue browsing."),c.a.createElement("script",{dangerouslySetInnerHTML:{__html:"if (document.getElementsByName('generator')[0].content.toLowerCase().slice(0,6) == 'gatsby') {\n console.log('Deleting Gatsby cache');\n caches.keys().then(async (cacheKeys)=>{await cacheKeys.map((cacheKey)=>{console.log('Deleting: ' + cacheKey);caches.delete(cacheKey)});window.location.reload(true)});\n }"}}))))}}}]); +//# sourceMappingURL=component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map \ No newline at end of file diff --git a/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map b/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map new file mode 100644 index 0000000..791e6f8 --- /dev/null +++ b/static/component---src-pages-404-js-aaa2fa405f7ff5b334ff.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///./src/pages/404.js"],"names":["NotFoundPage","className","style","textAlign","to","dangerouslySetInnerHTML","__html"],"mappings":"0FAAA,2CAyBeA,UArBM,kBACjB,kBAAC,IAAD,KACI,yBAAKC,UAAU,aACX,6BAASA,UAAU,UAAUC,MAAO,CAAEC,UAAU,WAC5C,wBAAIF,UAAU,iBAAd,gBACA,6BAASA,UAAU,gBAAnB,kCACmC,kBAAC,OAAD,CAAMG,GAAG,KAAT,mBADnC,0BAGA,4BACEC,wBAAyB,CACvBC,OAAO","file":"component---src-pages-404-js-aaa2fa405f7ff5b334ff.js","sourcesContent":["import React from 'react'\nimport { Link } from 'gatsby'\nimport { Layout } from '../components/common'\n\nconst NotFoundPage = () => (\n \n
\n
\n

Site Updated

\n
\n This website has been updated. Reload the page to continue browsing.\n
\n {await cacheKeys.map((cacheKey)=>{console.log('Deleting: ' + cacheKey);caches.delete(cacheKey)});window.location.reload(true)});\n }`,\n }}\n />\n
\n
\n
\n)\n\nexport default NotFoundPage\n"],"sourceRoot":""} \ No newline at end of file diff --git a/static/page-data/404.html/page-data.json b/static/page-data/404.html/page-data.json new file mode 100644 index 0000000..c2dfbf7 --- /dev/null +++ b/static/page-data/404.html/page-data.json @@ -0,0 +1 @@ +{"componentChunkName":"component---src-pages-404-js","path":"/404.html","webpackCompilationHash":"667633069bc0cde8992f","result":{"pageContext":{"isCreatedByStatefulCreatePages":true}}} \ No newline at end of file