The gatsby-manifest-plugin documentation for generating icons is unclear.
icon: `src/images/favion.svg`, // This path is relative to the root of the site.
icons: [
{
src: `src/images/favicon--short.svg`,
sizes: `192x192`,
type: `image/png`,
},
],
I have added the above code to the gatsby-config.js. However when running gatsby develop or gatsby build the terminal throws the following error.
error "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
ENOENT: no such file or directory, mkdir 'public/src/images'
303 |
304 | if (!exists) {
> 305 | fs.mkdirSync(iconPath);
| ^
306 | }
307 |
308 | paths[iconPath] = true;
Error: ENOENT: no such file or directory, mkdir 'public/src/images'
The documentation has the favicons in a folder called favicons. The error implies these icon files should be inside the public folder. But this seems incorrect.
Any advice would be helpful, thankyou.
The icon option should point to a file relative to the root of your site inside the src folder.
The icons defined in the icons option however reference icons that will eventually be in the public folder. One puts these files there by placing them inside the static folder.
Example:
1) https://github.com/LekoArts/gatsby-starter-minimal-blog/blob/master/gatsby-config.js#L55-L66
2) https://github.com/LekoArts/gatsby-starter-minimal-blog/tree/master/static
The documentation/README at https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/README.md should include a note that icons is referring to the final URL and thus images need to be added to static.
I was thinking in include a note below the config but it was already described below the Manual mode config section
you are responsible for defining the entire web app manifest and providing the defined icons in the static folder.
so I just wrote some comments next to the src path like with the icon path
Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 60 days of inactivity. Itβs been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! πͺπ
icons: [
{
src: `/android-chrome-192x192.png`,
sizes: `192x192`,
type: `image/png`,
},
{
src: `/android-chrome-512x512.png`,
sizes: `512x512`,
type: `image/png`,
},
],
},
},
@Anmol368 did you have a question/issue?
icons: [
{
src: src/images/favion.svg,
sizes: 192x192,
type: image/png,
},
],
Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 60 days of inactivity. Itβs been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply here.
As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request. Check out gatsby.dev/contribute for more information about opening PRs, triaging issues, and contributing!
Thanks for being a part of the Gatsby community! πͺπ
Done.
On Tue, 22 Dec 2020 at 18:11, Sijin raj notifications@github.com wrote:
Hi,
This is Sijin can i get few stickers from gatsby . please reply for thisOn Tue, 22 Dec 2020 at 17:40, github-actions[bot] <
[email protected]>
wrote:Hiya!
This issue has gone quiet. Spooky quiet. π»
We get a lot of issues, so we currently close issues after 60 days of
inactivity. Itβs been at least 20 days since the last update here.
If we missed this issue or if you want to keep it open, please reply
here.
As a friendly reminder: the best way to see this issue, or any other,
fixed is to open a Pull Request. Check out gatsby.dev/contribute
https://www.gatsbyjs.org/contributing/how-to-contribute/ for more
information about opening PRs, triaging issues, and contributing!Thanks for being a part of the Gatsby community! πͺπ
β
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/gatsbyjs/gatsby/issues/27751#issuecomment-749509910
,
or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/AM7I7AHRFD7U72JLRNY2UUDSWCEERANCNFSM4TGC7ZPA.
β
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/gatsbyjs/gatsby/issues/27751#issuecomment-749521451,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AM7I7AHIEPOHB3FGXKLICJDSWCHZFANCNFSM4TGC7ZPA
.
Most helpful comment
The
iconoption should point to a file relative to the root of your site inside thesrcfolder.The icons defined in the
iconsoption however reference icons that will eventually be in thepublicfolder. One puts these files there by placing them inside the static folder.Example:
1) https://github.com/LekoArts/gatsby-starter-minimal-blog/blob/master/gatsby-config.js#L55-L66
2) https://github.com/LekoArts/gatsby-starter-minimal-blog/tree/master/static
The documentation/README at https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-manifest/README.md should include a note that
iconsis referring to the final URL and thus images need to be added tostatic.