From 58a80a50e99e5850724cbf28c9cd0a4fa8098648 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 10 Jun 2019 19:21:51 +0200 Subject: [PATCH] switch to gatsby-plugin-manifest for web manifest and favicon generation --- gatsby-config.js | 39 +++++++++------------------------------ package.json | 2 +- 2 files changed, 10 insertions(+), 31 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index 71cb387..5e1ea7d 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -2,7 +2,7 @@ const path = require('path') const fs = require('fs') const yaml = require('js-yaml') const meta = yaml.load(fs.readFileSync('./content/meta.yml', 'utf8')) -const { title, description, url, matomoSite, matomoUrl } = meta[0] +const { title, url, matomoSite, matomoUrl } = meta[0] module.exports = { siteMetadata: { @@ -66,37 +66,16 @@ module.exports = { } }, { - resolve: 'gatsby-plugin-favicon', + resolve: 'gatsby-plugin-manifest', options: { - logo: './src/images/favicon.png', - - // WebApp Manifest Configuration - appName: title.toLowerCase(), - appDescription: description, - developerName: null, - developerURL: null, - dir: 'auto', - lang: 'en-US', - background: '#e7eef4', - theme_color: '#88bec8', - display: 'minimal-ui', - orientation: 'any', - start_url: '/?homescreen=1', + name: title.toLowerCase(), short_name: 'mk', - version: '1.0', - - icons: { - android: true, - appleIcon: true, - appleStartup: true, - coast: false, - favicons: true, - firefox: true, - opengraph: false, - twitter: false, - yandex: false, - windows: false - } + start_url: '/', + background_color: '#e7eef4', + theme_color: '#88bec8', + icon: 'src/images/favicon.png', + display: 'minimal-ui', + cache_busting_mode: 'name' } }, 'gatsby-plugin-react-helmet', diff --git a/package.json b/package.json index eeb61cd..462b14e 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "file-saver": "^2.0.1", "gatsby": "^2.8.6", "gatsby-image": "^2.1.2", - "gatsby-plugin-favicon": "^3.1.6", + "gatsby-plugin-manifest": "^2.1.1", "gatsby-plugin-matomo": "^0.7.1", "gatsby-plugin-offline": "^2.1.1", "gatsby-plugin-react-helmet": "^3.0.12",