-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gatsby-plugin-manifest): add option to generate apple-touch-icon…
…s links (#7256) Fixes #5887 /cc @seaneking @moonmeister I'd like to have gatsby-plugin-manifest to generate apple-touch-icon meta tags (links) for me. Would it be simple enough to generate tags under the same rules as for favicon (only when the icon is being generated by the plugin)? This has been required to be a new major release, but is that v2 (still in beta) or v3? The initial commit datakurre@4cf3ba4 should be the smallest possible change, but I'd probably like to move the code in a separate module where `withPrefix` is passed as a function argument and could be mocked in tests and make them simpler. * [x] discussion * [x] tests * [x] docs update?
- Loading branch information
Showing
6 changed files
with
368 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
packages/gatsby-plugin-manifest/src/__tests__/__snapshots__/gatsby-ssr.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`gatsby-plugin-manifest Adds "shortcut icon" and "manifest" links and "theme_color" meta tag to head 1`] = ` | ||
Array [ | ||
<link | ||
href="/icons/icon-48x48.png" | ||
rel="shortcut icon" | ||
/>, | ||
<link | ||
href="/manifest.webmanifest" | ||
rel="manifest" | ||
/>, | ||
<meta | ||
content="#000000" | ||
name="theme-color" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`gatsby-plugin-manifest Creates legacy apple touch links if opted in Using default set of icons 1`] = ` | ||
Array [ | ||
<link | ||
href="/icons/icon-48x48.png" | ||
rel="shortcut icon" | ||
/>, | ||
<link | ||
href="/manifest.webmanifest" | ||
rel="manifest" | ||
/>, | ||
<meta | ||
content="#000000" | ||
name="theme-color" | ||
/>, | ||
<link | ||
href="/icons/icon-48x48.png" | ||
rel="apple-touch-icon" | ||
sizes="48x48" | ||
/>, | ||
<link | ||
href="/icons/icon-72x72.png" | ||
rel="apple-touch-icon" | ||
sizes="72x72" | ||
/>, | ||
<link | ||
href="/icons/icon-96x96.png" | ||
rel="apple-touch-icon" | ||
sizes="96x96" | ||
/>, | ||
<link | ||
href="/icons/icon-144x144.png" | ||
rel="apple-touch-icon" | ||
sizes="144x144" | ||
/>, | ||
<link | ||
href="/icons/icon-192x192.png" | ||
rel="apple-touch-icon" | ||
sizes="192x192" | ||
/>, | ||
<link | ||
href="/icons/icon-256x256.png" | ||
rel="apple-touch-icon" | ||
sizes="256x256" | ||
/>, | ||
<link | ||
href="/icons/icon-384x384.png" | ||
rel="apple-touch-icon" | ||
sizes="384x384" | ||
/>, | ||
<link | ||
href="/icons/icon-512x512.png" | ||
rel="apple-touch-icon" | ||
sizes="512x512" | ||
/>, | ||
] | ||
`; | ||
|
||
exports[`gatsby-plugin-manifest Creates legacy apple touch links if opted in Using user specified list of icons 1`] = ` | ||
Array [ | ||
<link | ||
href="/favicons/android-chrome-48x48.png" | ||
rel="shortcut icon" | ||
/>, | ||
<link | ||
href="/manifest.webmanifest" | ||
rel="manifest" | ||
/>, | ||
<meta | ||
content="#000000" | ||
name="theme-color" | ||
/>, | ||
<link | ||
href="/favicons/android-chrome-48x48.png" | ||
rel="apple-touch-icon" | ||
sizes="48x48" | ||
/>, | ||
<link | ||
href="/favicons/android-chrome-512x512.png" | ||
rel="apple-touch-icon" | ||
sizes="512x512" | ||
/>, | ||
] | ||
`; |
Oops, something went wrong.