mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
Offline mode for developer guides
This commit is contained in:
parent
680e657934
commit
9619bf4fd4
@ -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/*`],
|
||||
},
|
||||
}
|
||||
],
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ exports.wrapPageElement = ({ element, props }) => {
|
||||
exports.onRenderBody = ({ setPostBodyComponents }) => {
|
||||
setPostBodyComponents([
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js" />,
|
||||
<script dangerouslySetInnerHTML={{
|
||||
process.env.NODE_ENV === 'production' && <script dangerouslySetInnerHTML={{
|
||||
__html: `
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
|
Loading…
Reference in New Issue
Block a user