Skip to content

Commit

Permalink
Fix path generation for msapplication-TileImage
Browse files Browse the repository at this point in the history
Fixes #48

The path for msTileImage was put together the wrong way:

"favicon.png-144x144.png" (wrong) vs "favicon-144x144.png" (right). This commit corrects the behaviour.
  • Loading branch information
hendrikbursian committed Aug 15, 2020
1 parent 1290754 commit 3790e26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gridsome.client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { parse } = require('path');
const { register } = require('register-service-worker');

const clientConfig = function (Vue, options, context) {
Expand Down Expand Up @@ -30,8 +31,8 @@ const clientConfig = function (Vue, options, context) {
}

const iconsDir = 'assets/static/';
const iconName = options.icon.split('/').slice(-1)[0];
const msTileImage = `/${iconsDir}${iconName}-144x144.png`;
const iconPathParsed = parse(options.icon);
const msTileImage = `/${iconsDir}${iconPathParsed.name}-144x144${iconPathParsed.ext}`;

head.link.push({
rel: 'manifest',
Expand Down

0 comments on commit 3790e26

Please sign in to comment.