Skip to content

Commit

Permalink
feat(icon): applefavicon option (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe-effinet authored and pi0 committed Jul 20, 2017
1 parent 6543596 commit 280b416
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/meta/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,15 @@ module.exports = function nuxtMeta (_options) {
// Favicon
if (options.favicon === true) {
options.favicon = options.icons && options.icons.length > 0 && options.icons[0].src
options.applefavicon = options.icons && options.icons.length > 0 && options.icons[3].src
}
if (options.favicon) {
if (!find(this.options.head.link, 'rel', 'shortcut icon')) {
this.options.head.link.push({ rel: 'shortcut icon', href: options.favicon })
}

if (!find(this.options.head.link, 'rel', 'apple-touch-icon')) {
this.options.head.link.push({ rel: 'apple-touch-icon', href: options.favicon })
this.options.head.link.push({ rel: 'apple-touch-icon', href: options.applefavicon })
}
}

Expand Down

0 comments on commit 280b416

Please sign in to comment.