Skip to content
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

[plugin-manifest] Add option to opt-out of generating favicon (vs. pwa icon) #11308

Closed
madeleineostoja opened this issue Jan 26, 2019 · 3 comments
Labels
help wanted Issue with a clear description that the community can help with.

Comments

@madeleineostoja
Copy link

madeleineostoja commented Jan 26, 2019

Summary

Currently gatsby-plugin-manifest automatically generates and links to a favicon as well as PWA style icons when in automatic or hybrid mode, and there's no way to opt-out of this behaviour without going full manual mode.

The plugin should expose an opt-out flag for this, as it already does for other problematic on-by-default features (eg: theme-color tags). Especially since a) favicons are arguably out of scope for a PWA manifest-style featureset anyway, and b) it's trivial for users to include their own single favicon asset.

Basic example

Easiest way to accomplish this is to add another optional config parameter to the plugin

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `GatsbyJS`,
	...
        icon: `src/images/icon.png`,
	include_favicon: true // Defaults to true to be non-breaking
      }
    }
  ]
}

Motivation

It's very common to want very different assets for a favicon and PWA icon — eg: a small transparent icon for the favicon, and a more intricate icon with a background for the PWA manifest. While you can achieve this using 'manual' mode, that's a frustrating workaround for a fairly large use-case.

@sidharthachatterjee sidharthachatterjee added help wanted Issue with a clear description that the community can help with. type: feature or enhancement labels Jan 28, 2019
@sidharthachatterjee
Copy link
Contributor

Thank you for opening this @seaneking

We would love to accept a PR adding this! Would you be interested?

@gurpreet-hanjra
Copy link
Contributor

Hello, can I take this task?

@pieh
Copy link
Contributor

pieh commented Jan 31, 2019

[email protected] was released which added support for include_favicon config option.

Thanks @gurpreet-hanjra for adding support for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with.
Projects
None yet
Development

No branches or pull requests

4 participants