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

gatsby-plugin-manifest: manifest file path #4901

Closed
wants to merge 1 commit into from
Closed

gatsby-plugin-manifest: manifest file path #4901

wants to merge 1 commit into from

Conversation

csepanda
Copy link

@csepanda csepanda commented Apr 9, 2018

gatsby-plugin-manifest writes manifest file into the
'./public/icons' directory, where favicons are placed
themselfs.

According to specification how src member is being handled:
https://www.w3.org/TR/appmanifest/#dom-imageresource-src

The algorithm takes a ImageResource icon, and a URL manifest URL,
which is the URL from which the manifest was fetched.

manifest URL is used as base-URL and during the URL processing
it exposes in the wrong way.

You can reproduce it in your browser console.

new URL(
    'icons/some_icon.png',
    'http://localhost/icons/manifest.json'
);
 URL {
   href: "http://localhost/icons/icons/some_icon.png",
   ...
 }

For more info about URL parsing please take a look at specification:
https://url.spec.whatwg.org/#concept-url-parser

repoduced in:

  • Firefox Quantum 59.0.2;
  • Chromium Version 64.0.3282.119;

gatsby-plugin-manifest writes manifest file into the
'./public/icons' directory, where favicons are placed
themselfs.

According to specification how src member is being handled:
https://www.w3.org/TR/appmanifest/#dom-imageresource-src

> The algorithm takes a ImageResource icon, and a URL manifest URL,
> which is the URL from which the manifest was fetched.

manifest URL is used as base-URL and during the URL processing
it exposes in the wrong way.

You can reproduce it in your browser console.
new URL(
    'icons/some_icon.png',
    'http://localhost/icons/manifest.json'
);

> URL {
>   href: "http://localhost/icons/icons/some_icon.png",
>   ...
> }

For more info about URL parsing please take a look at specification:
https://url.spec.whatwg.org/#concept-url-parser

repoduced in:
 - Firefox Quantum 59.0.2;
 - Chromium Version 64.0.3282.119;
@gatsbybot
Copy link
Collaborator

Deploy preview for using-drupal ready!

Built with commit b26a4bc

https://deploy-preview-4901--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

Deploy preview for gatsbygram ready!

Built with commit b26a4bc

https://deploy-preview-4901--gatsbygram.netlify.com

@pieh
Copy link
Contributor

pieh commented Apr 9, 2018

Thanks for PR! This is actually pretty much duplicate of #4890 which already was reviewed and is close to be merged, so I'll close this for now.

@pieh pieh closed this Apr 9, 2018
@csepanda
Copy link
Author

csepanda commented Apr 10, 2018

oops, missed that х)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants