-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Updating gatsby-plugin-manifest #4382
Updating gatsby-plugin-manifest #4382
Conversation
Deploy preview for using-glamor failed. Built with commit e7e1fed https://app.netlify.com/sites/using-glamor/deploys/5a9e08e1fd0efa5844440704 |
It seems like we could avoid having to do a v2 release — since the new release would just add favicon support right? It wouldn't change anything about the existing manifest support? I don't know anything about the webpack favicon plugin. I think gatsby-plugin-sharp would work great for generating different icons so that's definitely an option. But depending on how easy the webpack plugin is, it could be a lot less work using that. One advantage of gatsby-plugin-sharp is it'll keep the same API for gatsby v2 whereas we'll be doing a major upgrade of webpack so don't know how the webpack plugin will update. |
Thanks for tackling this! This will be huge — having a drop-in plugin that does everything right for you. |
@KyleAMathews Yeah I think this could be a stellar plugin.
I think the config issue is maybe one of the biggest challenges on this, maybe we can chat more about it on Friday, others might have good input. |
Ah! Ok, yeah, it's a breaking change then :-) Not a huge deal. But yeah, we can talk more about this Friday ;-) |
So, someone pointed out to me over at Creatiwity/gatsby-plugin-favicon#20 that if you disable the "chrome" on |
a7c6dc9
to
5707361
Compare
Deploy preview for gatsbygram ready! Built with commit 5707361 |
@KyleAMathews I got images being generated, and I figured out what I think is a pretty slick way to handle stuff so none of this is a breaking change. The problem is half the images are generate then it segfaults. :( The issue is sharp is running async and so it's not waiting for all the jobs to be returned before moving on in the build. So, how do I make it wait? I've never touched The one thing that has made the segfaults go away is moving the image generation out of the function and into the primary code (see below) however no images ever get created...at least with the segfaults I got a couple images... Please point me in the right direction, Thanks! const fs = require(`fs`)
const Promise = require(`bluebird`)
const sharp = require(`sharp`)
// default icons for generating icons
const defaultIcons = [
{
"src": `icons/icon-48x48.png`,
"sizes": `48x48`,
"type": `image/png`,
},
{
"src": `icons/icon-72x72.png`,
"sizes": `72x72`,
"type": `image/png`,
},
{
"src": `icons/icon-96x96.png`,
"sizes": `96x96`,
"type": `image/png`,
},
{
"src": `icons/icon-144x144.png`,
"sizes": `144x144`,
"type": `image/png`,
},
{
"src": `icons/icon-192x192.png`,
"sizes": `192x192`,
"type": `image/png`,
},
{
"src": `icons/icon-256x256.png`,
"sizes": `256x256`,
"type": `image/png`,
},
{
"src": `icons/icon-384x384.png`,
"sizes": `384x384`,
"type": `image/png`,
},
{
"src": `icons/icon-512x512.png`,
"sizes": `512x512`,
"type": `image/png`,
},
]
//sharp.simd(true)
function generateIcons(icons, srcIcon) {
Promise.map(icons, icon => {
const size = parseInt(icon.sizes.substring(0, icon.sizes.lastIndexOf(`x`)))
const imgPath = `./public/` + icon.src
return sharp(srcIcon)
.resize(size)
.toFile(imgPath)
})
}
exports.onPostBuild = (args, pluginOptions) =>
new Promise(resolve => {
console.log(`starting image stuff`)
const { icon } = pluginOptions
const manifest = { ...pluginOptions }
delete manifest.plugins
delete manifest.icon
if (!manifest.icons) {
manifest.icons = defaultIcons
}
const iconPath = `./public/` + manifest.icons[0].src.substring(0, manifest.icons[0].src.lastIndexOf(`/`))
if (!fs.existsSync(iconPath)){
fs.mkdirSync(iconPath)
}
generateIcons(manifest.icons, icon)
fs.writeFileSync(`${iconPath}/manifest.json`, JSON.stringify(manifest))
console.log(`ending image stuff`)
resolve()
}) |
You'd need to return |
Deploy preview for using-drupal ready! Built with commit 07f8c96 |
7f44f84
to
5cb3eb2
Compare
@KyleAMathews Okay, I've fixed the branch I blew up...should all be good. I've implemented the auto image generation and it's all backwards compatible. Let me know if there are any improvements that need to be made. Other than that I need to probably test some various configurations and make sure all is happy. Thoughts? Checkout the docs updates I made to see an explanation of the config changes and how it functions. @shannonbux Any input on my doc changes? Thanks |
@KyleAMathews @shannonbux Hey, FYI I'm taking ~5 months off starting on April 28th to go hiking in the woods from Mexico to Canada on the Pacific Crest Trail. If there is anything you want done on this PR the sooner you can let me know the better chance I'll be able to get it done before leaving. Thanks. |
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.
Looking really good! Could you change gatsbyjs.org (www) to use this now instead of our manually created icons! That'd be a sweet improvement :-)
@@ -52,4 +57,62 @@ plugins: [ | |||
]; | |||
``` | |||
|
|||
### Hybrid configuration |
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.
Does including a "hybrid" configuration make sense? Wouldn't you just do one or the other? Or is the idea that you could want different icons at larger sizes?
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.
Yeah. It was going to be more code to eliminate this option then it was to leave it in. I figured it was useful if people wanted to not create all the icons or wanted to create different or larger icons. It's also useful if they just didn't like my naming conventions and wanted to modify path or name. I also believe it'd allow them to use webp or jpeg instead of png if they so desired (I believe the default output image is set to match the input. So if they gave it a jpeg it'd spit out a jpeg).
Basically it gives more options and without adding any code complications and little to no config complications.
@KyleAMathews Yeah, I can look into swapping over the gatsbyjs.org site. Do you want that on the same PR? |
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.
Very well-organized doc! Sounds intriguing and further motivates me to keep learning to code so I can use stuff like this!
@@ -19,6 +19,11 @@ the created manifest.json. | |||
|
|||
## How to use | |||
|
|||
There are three configurations in which this plugin will function: manual, hybrid, and auto. What config options you include will determine how the plugin functions. |
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'd stay consistent with naming things, so either auto here and in the header below, or automatic in both cases. Not a huge deal, just makes it easier to scan the document for relevant information.
Might also make sense to stick with config or configuration and stay consistent.
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.
Also, will people know generally what this plugin is about? A brief description before the how to use section could be handy.
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 also rewording the last sentence to read "These three configuration options are explained below. The plugin functions differently depending on which of the three you choose." This would clearly link this paragraph with the following paragraph, and linking is nearly always a great thing.
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.
All sound good
There are three configurations in which this plugin will function: manual, hybrid, and auto. What config options you include will determine how the plugin functions. | ||
|
||
### Manual configuration | ||
In the manual configuration you are responsible for defining the entire web app manifest and providing the defined icons in the static directory. See the example below: |
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'd be really cool to see a 1-2 sentence use-case explained for each config option. Why would l choose manual vs. hybrid vs. automatic?
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.
YES! And I'll reorder cause auto should be first since it'll be the default most people want.
@@ -52,4 +57,62 @@ plugins: [ | |||
]; | |||
``` | |||
|
|||
### Hybrid configuration | |||
|
|||
In the hybrid configuration you are responsible for defining the entire web app manifest but instead of manually generating the defined icons you provide a hi-res source icon to be used to auto generate your defined icons. See the example below: |
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.
"to be used to" caught my eye and I had to read it a few times (passive voice, which is necessary in technical writing sometimes). Is there a way to make it active? "this plugin will use the hi-res source icon you provide to auto generate your defined icons"? Hm, not sure that's clear. What I'm really curious about is what is a source icon? Will people know what that is?
Also a couple commas could be useful "...manifest, but instead of manually generating the defined icons, you..."
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 rewrote this whole thing cause I reordered stuff
@moonmeister that hike is literally my dream. I want to hear all about it someday! Sounds incredible and hope you have a really nice time. |
@shannonbux It's been a dream of mine for a while too! I thought of you the other day cause my flight down there goes through SLC. It's unfortunate you can't stow away and get on the trail too! I'll be posting on instagram, so follow me there. Also, this is why I can't make write the docs in pdx...cause I'll be hiking. :( |
Well that was smooth, I managed not to hit save on the last set of changes...then pushed and closed out of the editor and clicked straight through the "Save" prompt...give me a sec...I have to rewrite a bunch of stuff. |
alright, try that on for size. :) |
Made some changes — lemme know what you think. |
…ng the "mode" idea. made some formatting more consistent. Fixed the Hybrid description to be more clear. Hybrid only gerates icons from the provided `icons` array, not a amalgamation of both.
@KyleAMathews Overall I like the changes you made. I've cleaned up some more formatting and made some of the language more consistent to how you modified it using The big thing i rewrote the hybrid description. hybrid does not combine the default icons array and the one provided, it only creates icons from the array provided. I rewrote the section, hopefully it makes sense now. Let me know. |
Ah! I didn't understand what the hybrid mode is doing clearly :-) Looking good now! |
Add some more keywords so this plugin will show up for searches for those in our plugin library.
Thanks! This is a great improvement. |
Oh, we didn't get this into gatsbyjs.org — you want to add that on a follow-on PR? |
@KyleAMathews Yeah I'll try, it should be easy. I have a PR on Netlify CMS I should get done before I head out, so we'll see if I have time. I'll do what I can. |
It looks like there was a typo in 'gatsby-ssr.js' for gatsby-plugin-manifest. The manifest link is missing a forward slash. It is currently:
but should be
Without this change it is creating the link as I can try and do a pull request, but it might be a couple of days before I get the time to go through all the steps. |
@ChrisBoon PR would be great! |
@ChrisBoon this is the Gatsby site and looks fine. Am I missing something? What's your config look like? |
The problem doesn't appear in the Gatsby site as that isn't hosted at a subdirectory and so doesn't use a path-prefix. The issue is pretty simple. running However, running Switching the function to Here are some console logs running in develop mode and build with the These are produced by this code:
|
@ChrisBoon Makes Sense. Thanks for the detail. If I have some time I can submit a PR or you're welcome to. Thanks. |
* Refactors email signup form to use gatsby-plugin-mailchimp * Adds two babel plugins * Refactors email signup form to use gatsby-plugin-mailchimp * Adds two babel plugins * Refactors from async/await to then/catch * Removes useless gatsby-node change * Bumps dep version * Refactors email signup form to use gatsby-plugin-mailchimp Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Adds two babel plugins Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Consistently use `npm` instead of `yarn` [Docs][Review] (#4607) * Remove yarn from “Deploying” TODO: no sure if to remove/convert yarn example from GitLab instructions on this page, since GitLab might rely on yarn and not npm. * Use npm instead of yarn in Style Guide * Minor: guides -> Guides * npm instead of Yarn in GitHub Pages setup * GitLab yarn -> npm * Revert "Use npm instead of yarn in Style Guide" This reverts commit ac72f11. For our internal stuff, we do want people to use Yarn as we commit yarn.lock files. * Blog: Hexo yarn -> npm * Package readme: yarn -> npm Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * remark-prismjs: add aliases for languages (#4688) * remark-prismjs: refactor tests into pre and code * remark-prismjs: add aliases for languages This allows specifying aliases for languages when using prismjs. Fixes #4549 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * internally use Map() in getState()'s pages (#4681) In an attempt to debug issue #4680 and generally improve the performance of Gatsby as a whole, we swapped out the Array that `getState()` uses internally with a `Map()`. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-1-config-css-modules@1.0.11 - gatsby-plugin-coffeescript@1.4.13 - gatsby-plugin-create-client-paths@1.0.8 - gatsby-plugin-google-tagmanager@1.0.16 - gatsby-plugin-less@1.1.8 - gatsby-plugin-postcss-sass@1.0.19 - gatsby-plugin-react-css-modules@1.0.15 - gatsby-plugin-remove-trailing-slashes@1.0.9 - gatsby-plugin-sass@1.0.24 - gatsby-plugin-styled-components@2.0.10 - gatsby-plugin-styled-jsx@2.0.6 - gatsby-plugin-stylus@1.1.17 - gatsby-plugin-typescript@1.4.19 - gatsby-remark-embed-snippet@1.0.16 - gatsby-remark-prismjs@1.2.21 - gatsby-source-faker@1.0.7 - gatsby-transformer-react-docgen@1.0.17 - gatsby@1.9.241 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add direct link to download VS Community 2015 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add CodeBushi to showcase replacing hunterchang.com with CodeBushi Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add Gatsby Starter Tailwind Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add philippczernitzki.me to Showcase (#4710) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Also point to download page and update description Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [www] Fix logic to determine selected plugin from list (#4706) * fix logic to determine selected plugin from list * fix selected style for scoped packages Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix #4503 (#4698) * Fix #4503 - added check to make sure node exists before tying to get descendents and delete - added test case that calls deleteNode on an undefined node * formatting * formatting Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Change the name & description of gatsbyjs.org (#4713) Instead of: You can now view gatsby-starter-default in the browser. It’s now: You can now view gatsbyjs.org in the browser. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-1-config-extract-plugin@1.0.3 - gatsby-cli@1.1.49 - gatsby-plugin-fullstory@1.0.3 - gatsby-plugin-google-analytics@1.0.25 - gatsby-plugin-google-tagmanager@1.0.17 - gatsby-plugin-sass@1.0.25 - gatsby-remark-embed-snippet@1.0.17 - gatsby-remark-images@1.5.60 - gatsby-transformer-remark@1.7.38 - gatsby@1.9.242 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add docs page on setting up Linux for Gatsby (#4716) * new page an title * add in outline * build tools * node-install * links and preamble * debian too * Update gatsby-on-linux.md * Copy edits * Copy edits * Update gatsby-on-linux.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Document gatsby-link being only for internal links (#4720) Add an example of a component which could be used to automatically choose <a> or gatsby-link depending on the destination. Resolves #4662. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add support for the Styled Components Babel plugin (#4722) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-link@1.6.40 - gatsby-plugin-styled-components@2.0.11 - gatsby@1.9.243 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix typo on Linux docs page (#4728) * new page an title * add in outline * build tools * node-install * links and preamble * debian too * Update gatsby-on-linux.md * Copy edits * Copy edits * Update gatsby-on-linux.md * typo you, your * typo you, your Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add Gatsby Starter Bloomer (#4731) Add new starter info to documentation Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add SSR support to i18next article (#4582) * Add SSR support to i18next article * Add note translate hoc (react-i18next) cause component not able to SSR Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add WebGazer to Showcase sites on README Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-transformer-remark] Don't generate AST for same node multiple times in parallel. (#4734) If we are already generating AST for given node - wait for result of that. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Queue page requests to wp endpoints (#4735) * Wrap better-queue with Promise syntax that resolves when the queue drains * Queue requests for wp objects. Added config to set concurreny of the requests * Use concurrency instead of batchSize * Fix passing the config to the getPages function Fix how options are passed in to better-queue Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [www] Move Plugins page from /packages to /plugins (#4705) * move plugins page from /packages to /plugins * revert package slug to /packages * /packages instead of /plugins as path for packages * fix formatting * Update index.js * Update index.js * Fix sidebar Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-source-wordpress@2.0.70 - gatsby-transformer-remark@1.7.39 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add gatsby-starter-i18n-lingui (#4741) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add smakosh.com to Showcase (#4678) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [remark-autolink-headers] Show anchor when :focus'ed (#4739) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-source-wordpress] support for exlcuded manufacturers and types (#4538) * [gatsby-source-wordpress] support for excluded manufacturers and types * [gatsby-source-wordpress] first take on globe exclusion matching * [gatsby-source-wordpress] route based globbing * [gatsby-source-wordpress] correcint excludeRoutes README * [gatsby-source-wordpress] iterate excludedRoutes * [gatsby-source-wordpress] adding minimatch as dependency * [gatsby-source-wordpress] renaming concurrentRequests parameter for consistency also added doc note for concurrentRequests and fixed bug in getPages call that prevented verbose output * [gatsby-source-wordpress] adding better-queue as explicit dependency Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-source-wordpress] Link Parent pages to pages (#4747) * Generic implementation for all node types * Update gatsby-node.js * Update normalize.js Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-remark-autolink-headers@1.4.14 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-remark-autolink-headers@1.4.15 - gatsby-source-wordpress@2.0.71 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Adding a new site built with Gatsby (#4752) Migrated from my blog from WordPress to Gatsby Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update CONTRIBUTING_ES.md Updated a bit of translation. Still needs a unified stlye for the markdown IMO Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update README.md (#4764) * Update README.md * Update README.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add HS Hackathons to projects list Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * updating scrape.js for gatsbygram (#4777) * updating scrape.js for gatsbygram * Update gatsbygram images Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add seo docs (#4766) * add seo link * Create seo.md * Typo * Typo * Copy edits Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Correct potential miscommunication in SEO doc (#4778) It's implying that we don't client render — which we do — so remove that fragment since not important to message of the sentence. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * add Bartosz Dominiak site to showcase (#4784) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-react-helmet@2.0.9 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add OutboundLink component to gatsby-plugin-google-analytics + track links on gatsbyjs.org (#4786) * Add OutBoundLink component to gatsby-plugin-google-analytics * Track outbound links on gatsbyjs.org * Fix link errors + handle other types of clicks * Use named arguments Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Document new component <OutboundLink> (#4787) * Add OutBoundLink component to gatsby-plugin-google-analytics * Track outbound links on gatsbyjs.org * Fix link errors + handle other types of clicks * Use named arguments * Document new component <OutboundLink> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-google-analytics@1.0.26 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add banner for Gatsby workshops (#4788) * Add banner for Gatsby workshops * Copy edit Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-google-analytics@1.0.27 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update gatsby-starters.md (#4798) Added a new starter - Gatsby Starter Business Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add Photon to starters (#4781) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Don't query for unnecessary fields in gatsby-node.js createPages so people don't think these are needed (#4801) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Remove unnecessary fourth backtick (#4796) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix typo (#4794) Fix very small typo on doc under GraphQL Reference section. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * readme: Add Rohit's HBTU MUN site (#4791) * readme: Add Rohit's HBTU MUN site * Update README.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Improve description and keywords for gatsby-plugin-react-helmet so more findable in plugin library (#4806) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-react-helmet@2.0.10 - gatsby-remark-embed-snippet@1.0.18 - gatsby-remark-prismjs@1.2.22 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Added blog post (#4758) * Added blog post about WordPress to Gatsby migration * Added blog post about WordPress to Gatsby migration - canonical info and excerpt added * Added canonical link to header of blog post pages * Format and edits * Manage canonical url with react-helmet so easy for a blog post to override it Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Flag to disable uglify for production builds (#4755) * add no-uglify option to build command * uglify js bundles based on cli arg * fix formatting Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-cli@1.1.50 - gatsby@1.9.244 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix banner styles (#4808) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Queue requests from createRemoteFileNode and control concurrency of requests (#4616) * Chunk the requests to download media objects from WP. The blog I work on has over 9,000 media objects and currently, it tries to download them all. This PR chunks them in groups of 100, but that setting can be increased. * Remove prettier forrmatting from the readme * Clean up and document create-remote-file-node Add Better Queue for more control over processing * Rollback changes to wp source files * Add queue for requesting wp objects update readme with new config option * Revert files to master * No longer throw an exception when an error occurs. Just resolve with null and move on * Remove file lock lookup for now. 200 concurrent requests is a safe number and we can look to change this in the future * Cosmoetic updates * Remove console.log Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Banner positioning fix for www (#4810) * fixes banner scrolling on www * fix banner positioning Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix spelling error (#4819) See: #4815 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * responsiveResolution is depracated (#4811) According to #2320 "responsive" is dropped in favor of resolutions. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-google-analytics@1.0.28 - gatsby-source-contentful@1.3.45 - gatsby-source-drupal@2.0.30 - gatsby-source-filesystem@1.5.28 - gatsby-source-wordpress@2.0.72 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add Storybook to Websites built with Gatsby (#4824) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Don't handle line highlights unless there's actually line highlights fixes #4802 (#4823) * Don't handle line highlights unless there's actually line highlights fixes #4802 * Update snapshots for gatsby-remark-embed-snippet Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-remark-embed-snippet@1.0.19 - gatsby-remark-prismjs@1.2.23 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add protocol to Storybook website (#4825) Apparently github considers websites without protocol as relative paths to the repo Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Tags to posts (#4782) * tags * tags for gatsbyjs.org * add all doc tags, queries for non-kebab-case tags like Contentful still acting weird * fix tags * fix link from tags page Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * links to plugin authoring page added and fixed (#4822) * links to plugin authoring page fixed Do I use html hyperlinks in the .js file? Happy to change that if needed. * correct .js file and corrected link * deleted packages.js~HEAD and updated link to plugin authoring * Fix link Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [starters] Add gatsby-starter-typescript-plus (#4821) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * add local time designators for ISO 8601 format (#4813) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby@1.9.245 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add new example doc: GraphQL Reference/Query Variables (#4795) * Add new example doc: GraphQL Reference/Query Variables * Update graphql-reference.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Omit undefined attributes from noscript images (#4639) * Set default noscript width and height to null To solve issue #4317, this sets the default values of the noscript image's height and width attributes to null. The current default values of "" fail HTML validation because these attributes (if present) must be non-negative integers. Omitting these non-required attributes entirely when no width/height is provided (by setting them to null) solves the validation issue. * Omit undefined attributes from noscriptImg string output This edit checks each prop sent to noscriptImg() to see if it exists before adding the relevant attribute to the `<img>` string. This prevents attributes with undefined values from being added to the markup as empty strings (e.g. `width=""` and `height=""`), which can cause HTML validation errors in some cases. The two required `<img>` attributes (`src` and `alt`) are included as empty strings by default. All other attributes are omitted if undefined. * Fixed typo in comment * Include opacity and transitionDelay prop values I accidentally omitted the prop values for opacity and transitionDelay (I only included the default values). This edit adds the prop values (if any) back in. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * improve error message for graphql queries (#4615) * improve error message for graphql queries Show where the `.cache` file is to make debugging easier. * improve error message for graphql queries Show the path (slug, usually) and the pluginID * Update query-runner.js Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-image@1.0.43 - gatsby@1.9.246 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Styleguide example (#3304) * Adds plop boilerplate * Adds base stuff * Configurable background colors * Rename props * Add a comment * Add a component README * Tweaks * Can query successfully * Adds components and index * Add prop types * Adds component index * Link back to component index * Showing props / methods * Add size prop to Button * Remove log * We are querying markdown * Feeds example html into renderer * Parsing / rendering HTML * Starts parsing nodes * It works * Add prop types * Adds size example to README * Sets up component index * Writes dyanmic component index to the cache * Renaming for clarity * Add description * Renaming * Possible strategy for ensuring durability of components in library previews * Using a particular prism theme * Fix proptypes * POC styling editor * Converts to table * new name Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update README.md (#4829) * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * add audacious project to showcase Add a link to https://audaciousproject.org/, which launched today (4/4/2018) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-source-wordpress] Handle all media types (#4817) * Abstract media checking to URL in normalize.js * Format request-in-queue.js * Format __tests__/request-in-queue.js Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * add new starter (gatsby advanced blog) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-remark-autolink-headers@1.4.16 - gatsby-source-wordpress@2.0.73 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add missing import Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Completed instructions to use gatsby-transformer-excel (#4852) * Completed instructions to use gatsby-transformer-excel After trying to use the plugin for a while, I figured out that I needed to use `gatsby-source-filesystem` to point my Excel's files directory. I propose to update the documentation in this way. * Update README.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * iPhone X support (#4835) Adds support for the iPhone X safe area insets. Link: https://webkit.org/blog/7929/designing-websites-for-iphone-x/ Here’s a preview of what it looks like: https://twitter.com/codeOfRobin/status/981473964223430658 Signed-off-by: Robin Malhotra <me@rmalhotra.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * change pathPrefix from a plugin option to passed opt (#4841) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Updating gatsby-plugin-manifest (#4382) * add auto image generation support, update docs * fix spelling error and clarify wording * Update docs with shannon's feedback * rewrite since I forgot to save * Update README.md * Update gatsby-node.js * I made some of the language consistent like shannon requested but using the "mode" idea. made some formatting more consistent. Fixed the Hybrid description to be more clear. Hybrid only gerates icons from the provided `icons` array, not a amalgamation of both. * Update package.json Add some more keywords so this plugin will show up for searches for those in our plugin library. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-manifest@1.0.16 - gatsby-remark-copy-linked-files@1.5.31 - gatsby-transformer-excel@1.0.6 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update Gatsbygram data from instagram (#4855) * For some reason, one of the gatsbygram images is failing to transform which breaks appveyor. Quick workaround * Or I guess I just needed to refresh the data * Delete old file * Add new file Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-source-wordpress] take advantage of `modified` field in media rest endpoint to not request file if we already have it (#4872) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-source-wordpress@2.0.74 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add blog post introducing RFC process (#4876) * Add blog post introducing RFC process * Small fixes * Add links to contributing docs to RFC blog post * Add date Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * [gatsby-source-filesystem/createRemoteFileNode] wait for file stream to finish, not just for response (#4877) * format * [gatsby-source-filesystem/createRemoteFileNode] wait for file stream to finish, not just for response Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-source-drupal@2.0.31 - gatsby-source-filesystem@1.5.29 - gatsby-source-wordpress@2.0.75 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Correct the name of the WordPress REST API The WordPress REST API is officially referred to as the WP REST API. There is a JSON REST API plugin, which could be confusing to users. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * fix(gatsby-transfomer-remark): memory leak of ASTPromiseMap Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Remove redundantcy in WordPress' API name I'm trying to be perfectly clear in the name of the API that is used. Perfect clarity includes removing redundancy and ambiguity. https://cl.ly/1Z2e2b0d0t1g https://developer.wordpress.org/rest-api/ Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Move default icons to common file (#4867) Fixes #4865 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-manifest@1.0.17 - gatsby-source-wordpress@2.0.76 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Link Gatsbygram Case Study in README (#4879) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Handle banner in sidebar styles fixes #4878 (#4886) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Adds new starter "gatsby-starter-procyon" (#4871) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add dependency instruction (#4869) * Add dependency instruction When using the gatsby-transformer-javascript-frontmatter the gatsby-source-filesystem plugin needs to be installed as well but this is nowhere documented. * Update README.md Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Explained what cd means for starter installation (#4737) * Explained what cd means for starter installation Is "change" the right word in this phrasing? "Similar to part one, open a new terminal window and run the following commands to install and then change to your new tutorial-part-two directory:" * made name of directory clear * Add back ticks to directory, grammar edit * Add back ticks to directory, grammar Broke up the sentence and opted for “just like in” for clarity. “Similar to” makes me have to think “what is similar?” which makes me doubt myself. * added back ticks Thanks for this idea! Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Don't add an extra trailing newline part deux (#4831) * Don't add an extra trailing newline part deux When using the highlighting lines, don't add an extra trailing newline. * update snapshots in gatsby-remark-embed-snippet Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-remark-embed-snippet@1.0.20 - gatsby-remark-prismjs@1.2.24 - gatsby-transformer-javascript-frontmatter@1.0.9 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add gatsby-starter-2column-portfolio starter (#4883) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * adjust indices used for extracting graphqlparser errors after adding capturing group in #4618 (#4889) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby@1.9.247 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Formatting fix in Readme (#4897) Within the table documenting the _`gatsby-image` props_ the notation `string|object` led to markdown interpreting the `|` as a column separation. I changed it to `string` / `object`. This way the description of these properties now also shows up. Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Relocate manifest.json to ./public/ (#4890) * Relocate manifest.json to ./public/ * Remove unused variables * Use path.join Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add upGizmo to showcase (#4902) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-image@1.0.44 - gatsby-plugin-manifest@1.0.18 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Extract `getNode` method from `args`, not `boundActionCreators` (#4907) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-image@1.0.45 - gatsby-plugin-manifest@1.0.19 - gatsby-source-contentful@1.3.46 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * feat: add airtable tutorial Signed-off-by: Kurtis Kemple <kurtiskemple@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * move gatsby to automated Icon generation with new manifest plugin features (#4929) Signed-off-by: AJ Moon <aj.moon@thugdesign.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * update CONTRIBUTING.md with DCO section (#4924) * update CONTRIBUTING.md with DCO section Signed-off-by: Michal Piechowiak <misiek.piechowiak@gmail.com> * Minor tweaks Signed-off-by: Mike Allanson <michael.allanson@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Added bastionbot.org to showcase (#4909) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix the version of imagemin-pngquant (#4915) Signed-off-by: Shaun Bent <shaunbent@me.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Blog Post - Comments with Gatsby (#4916) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * feat: add simple auth example (#4923) This is a demo of client-only routes that require a user to be authenticated before viewing. It does NOT show how to build secure authentication. (This is called out in the README.) Signed-off-by: Jason Lengstorf <jason@lengstorf.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Added createTypeName to ensure unique name for union types. (#4925) Signed-off-by: Michael Hellein <themichaek@gmail.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Publish - gatsby-plugin-sharp@1.6.42 - gatsby-remark-images@1.5.61 - gatsby@1.9.248 Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Update building-apps-with-gatsby.md Signed-off-by: Kyle Mathews <mathews.kyle@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix typo Signed-off-by: Mike Allanson <michael.allanson@gmail.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * add yuuniworks.com to showcase Signed-off-by: stam <junkboy0315@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add chinloongtan.com to showcase Signed-off-by: chinloong <chinloong91@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Ignore nodes with no URL field (#4930) Signed-off-by: David Beckley <beckl.ds@gmail.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Documentation for multiple environments (#4858) * Documentation for multiple environments Updating documentation to provide guidance on environment support beyond development and production * add gatsby develop environment command Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * chore(npm source): use index.browse (#4861) * chore(npm source): use index.browse This will get all of the hits, even if they are on multiple pages, and is actually better for this usecase Signed-off-by: Haroen Viaene <hello@haroen.me> * chore(search): update API key with unique one for gatsby Signed-off-by: Haroen Viaene <hello@haroen.me> * simplify and fix Signed-off-by: Haroen Viaene <hello@haroen.me> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Grammar fixes in tutorial. (#4928) Signed-off-by: Tim Whiteaker <whiteaker@utexas.edu>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Changed createNode docs to show parent should be set to null instead of empty string when not needed. Signed-off-by: Grayson Hicks <graysonhicks@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Quick fix for www Signed-off-by: Mike Allanson <michael.allanson@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix link in blog post (#4959) Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Refactors email signup form to use gatsby-plugin-mailchimp Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Blog post - Trying out Gatsby at Work & Co (#4945) Signed-off-by: Sarah Mogin <mogin@work.co>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Add F1 Vision to showcase (#4958) Signed-off-by: Martin Bavio <mbavio@gmail.com>Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Small fixes to source-wordpress README Signed-off-by: Kyle Mathews <mathews.kyle@gmail.com> Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Fix typo Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Refactors from async/await to then/catch Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Removes useless gatsby-node change Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * Bumps dep version Signed-off-by: benjamin hoffman <6520022+benjaminhoffman@users.noreply.github.com> * removes useless deps
btw, totally fixed the prefix thing a couple weeks ago not noticing this ticket - #5406 |
@halkeye - Awesome, thanks for letting me know (and for fixing it 😀). |
Hiya @moonmeister! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
The problem
There are currently two plugins in the Gatsby eco system that deal with the web app manifest, favicons,
and apple icons (
gatsby-plugin-manifest
andgatsby-plugin-favicon
). The latter auto generates these images but allows no customization of the other manifest properties. The former allows complete customization while not providing auto generation of the various icons.The goal
In short the goal of this PR is to update the existing
gatsby-plugin-manifest
to include auto generation of images and maintain it's great flexibility in configuring all aspects of the web app manifest.The challenges
While I was hoping to "simply" combined the two plugins it's not going to be so easy (of course not, how naive of me). The gatsby-plugin-favicon relies on another npm module that acts as a plugin to webpack favicons-webpack-plugin. That module in turn relies on the favicons.
The biggest problem is the
favicons-webpack-plugin
doesn't support the web app manifest configs for anything other thatname
andbackground-color
. You can't configure any other parameters. The underlyingfavicons
plugin does support more, if not all the various web app manifest parameters, it's quite out of date. For Firefox, it's still generating what's now defunct spec. There's a couple other weir quirks I won't get into.The solution
Theory
Now that the Chrome spec is becoming standardized by [W3](https://www.w3.org/TR/appmanifest/, this plugin should reflect that standard.
I love how the current
gatsby-plugin-manifest
simply passes the plugin config on to be the webapp manifest. This means our plugin will maintain compatability to the spec without modification...people simply have to update their config. Obviously, if we want to add new fields to have default values we can do that.This will need to be augmented by some boolean values that determine what images are created and what part of the
icons
config is added.The backwards compatibility issue
Currently only Edge maybe, Firefox, Opera, and Chrome support the web app manifest standard. We have to account for that...
What's up with the ie, apple, favicons boolean values above? This controls weather our web app includes support for these non-standard standards. IE and Safari/Apple don't support the web app manifest standard. Favicons are still a thing though (this is total speculation) may be eclipsed by the web app manifest standard. But for now we should probably keep generating them.
Reality
IMO, basically nothing from the
gatsby-plugin-favicons
plugin is useful moving forward. Given thatgatsby-plugin-sharp
exists I'm thinking that we could leverage that to generate the needed images from a single source file. The plugin would auto populate theicons
attribute of themanifest.json
and all other attributes in themanifest.json
would be passed through from the plugin config. Any other files, headers, icons for IE, Apple, and the favicon would also be generate automatically. Any data in IE'sbrowserconfig.xml
would be derived from the web app manifest fields.In conclusion...
So what code did you just submit?
Basically, I modified to
gatsby-plugin-manifest
to begatsby-plugin-favicon
and then tried to modify the code to be able to configure themanifest.json
. But, due to the previously mentioned issues the only thing this code adds is the ability to modify thename
andbackground-color
fields. So, this code is functionally worthless and should never see release, it was useful in that I learned everything above...fun times.Feedback:
Please give me feed back on any thoughts on how this plugin should function in it's v2 state. The one question I specifically have is:
Resources
Are lots of resources and reference guides for the various specs mentioned in this PR. While this exists I don't believe it's entirely accurate... I could be wrong though.
Specs
Web app Manifest W3 Spec: https://www.w3.org/TR/appmanifest/
Favicon: https://www.w3.org/2005/10/howto-favicon
Individual Browser Reference
Chrome: https://developers.google.com/web/fundamentals/web-app-manifest/
Apple: https://developer.apple.com/library/content/documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
Internet Explore: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn320426(v=vs.85)
FireFox: https://developer.mozilla.org/en-US/docs/Web/Manifest
Opera: https://dev.opera.com/articles/installable-web-apps/