-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add apple platform for single apple-touch-icon #309
base: master
Are you sure you want to change the base?
Conversation
- set default to false - add platform to html - add config icon - add to all platform option - include apple platform in tests - update readme with explanation from webhint
/cc @dmnsgn sorry for delay, friendly ping |
@@ -9,6 +9,12 @@ module.exports = { | |||
({ theme_color, background }) => `<meta name="theme-color" content="${theme_color || background}">`, | |||
({ appName }) => appName ? `<meta name="application-name" content="${appName}">` : `<meta name="application-name">` | |||
], | |||
apple: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about do not add new options, and use existing appleIcon
? For example:
appleIcon: true
- generate all iconsappleIcon: []
- allow to specify sizesappleIcon: 'minimum'
generate only minimum required icons and tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like moving forward, what you have named minimum
is actually be the norm and recommended on Apple platforms. So I'd actually go the other way around:
appleIcon: 'all'
- generate all iconsappleIcon: []
- allow to specify sizesappleIcon: true
- generate only minimum required icons and tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid changing logic for appleIcon: true
is will be breaking change, we can do it in the next major release, not right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, isn't this PR #312 solving the problem by allowing to pass appleIcon: ["apple-touch-icon.png"]
? I don't think the generated html is updated though (eg. all sizes are still in html, just images are generated) as I don't see any filter here: https://github.com/itgalaxy/favicons/blob/master/src/config/html.js#L12
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to send a fix for #312, appleIcon: true- generate all icons
is not generate all icons, we can't change it by default
This PR add a new platform:
apple
and takes care of generating a single icon image for apple devices (<link rel="apple-touch-icon" href="apple-touch-icon.png">
. It follows the recommendation from webhint and lighthouse to have a single image instead of the dozen currently generated by theappleIcon
platform:I went the separate platform way instead of a
onlyNewAppleSizes
option as suggested in @evilebottnawi comment (#130 (comment)) as it seems to be the new norm, it's quite specific to the apple platform and I see it as exclusive from the current appleIcon support that might disappear. Let me know if that makes sense!Close #130
Close #198