diff --git a/_11ty/plugins.js b/_11ty/plugins.js index 73ea4f2..42751b5 100644 --- a/_11ty/plugins.js +++ b/_11ty/plugins.js @@ -1,11 +1,9 @@ const { IS_PRODUCTION } = require('./constants'); -const siteConfig = require('../content/_data/siteConfig'); const pluginRss = require('@11ty/eleventy-plugin-rss'); const { EleventyHtmlBasePlugin } = require('@11ty/eleventy'); const pluginEmoji = require('eleventy-plugin-emoji'); const eleventyNavigationPlugin = require('@11ty/eleventy-navigation'); const srcSet = require('./plugins/srcset'); -const pluginPWA = require('eleventy-plugin-pwa-v2'); const syntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight'); const productionPlugins = IS_PRODUCTION @@ -16,32 +14,6 @@ const productionPlugins = IS_PRODUCTION ] : []; -const pwaPluginConfig = siteConfig.enablePWA - ? [ - { - body: pluginPWA, - options: { - cacheId: siteConfig.site.title, - runtimeCaching: [ - { - urlPattern: /\/$/, - handler: 'NetworkFirst', - }, - { - urlPattern: /\.html$/, - handler: 'NetworkFirst', - }, - { - urlPattern: - /^.*\.(jpg|png|mp4|gif|webp|ico|svg|woff2|woff|eot|ttf|otf|ttc|json)$/, - handler: 'StaleWhileRevalidate', - }, - ], - }, - }, - ] - : []; - const plugins = [ { body: EleventyHtmlBasePlugin, @@ -60,4 +32,4 @@ const plugins = [ }, ]; -module.exports = [...plugins, ...pwaPluginConfig, ...productionPlugins]; +module.exports = [...plugins, ...productionPlugins]; diff --git a/content/_data/siteConfig.js b/content/_data/siteConfig.js index b1fecee..f8c48f9 100644 --- a/content/_data/siteConfig.js +++ b/content/_data/siteConfig.js @@ -147,7 +147,6 @@ module.exports = { // --------------------------------------------------------------------------- // Settings for PWA // --------------------------------------------------------------------------- - enablePWA: false, // If enabled, service worker for PWA will be registered manifestJson: { // Language of PWA application language: 'en-US', diff --git a/content/_includes/partials/head.njk b/content/_includes/partials/head.njk index 0230a9e..3169d7d 100644 --- a/content/_includes/partials/head.njk +++ b/content/_includes/partials/head.njk @@ -56,7 +56,6 @@ {% include "partials/head/title.njk" %} {% include "partials/head/styles.njk" %} {% include "partials/head/scripts.njk" %} -{% include "partials/head/service-worker.njk" %} {% include "partials/head/description.njk" %} {% include "partials/head/canonical.njk" %} {% include "partials/head/generator.njk" %} diff --git a/content/_includes/partials/head/service-worker.njk b/content/_includes/partials/head/service-worker.njk index a1d67c4..e69de29 100644 --- a/content/_includes/partials/head/service-worker.njk +++ b/content/_includes/partials/head/service-worker.njk @@ -1,33 +0,0 @@ -{% if siteConfig.enablePWA %} - -{% else %} - -{% endif %} \ No newline at end of file diff --git a/package.json b/package.json index ee16f52..0a9a2ca 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,7 @@ "cross-env": "^7.0.3", "crypto-js": "^4.2.0", "eleventy-plugin-emoji": "^1.1.0", - "eleventy-plugin-pwa-v2": "^1.0.1", - "eslint": "^9.0.0", + "eslint": "^8.0.0", "eslint-plugin-import": "^2.29.1", "html-minifier-terser": "^7.2.0", "jsdom": "^24.0.0",