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

404 and SW fallback pages are included in sitemap.xml #4621

Closed
arrrgi opened this issue Mar 20, 2018 · 2 comments
Closed

404 and SW fallback pages are included in sitemap.xml #4621

arrrgi opened this issue Mar 20, 2018 · 2 comments

Comments

@arrrgi
Copy link

arrrgi commented Mar 20, 2018

Description

gatsby-plugin-sitemap includes dev-404-page, offline-plugin-app-shell-fallback, 404 and 404.html in generated sitemap. See comment on Issue #4562 by @prince0203

Steps to reproduce

Include gatsby-plugin-sitemap in gatsby-config.js with the following GraphQL query:

{
    site {
        siteMetadata {
            siteUrl
        }
    }

    allSitePage {
        edges {
            node {
                path
             }
         }
     }
}

Expected result

404 and offline service worker pages should be excluded from the generated sitemap.xml

Actual result

Dev, 404 and service worker fallback pages were included in the sitemap.xml

Environment

  • Gatsby version (npm list gatsby): 1.9.158
  • gatsby-cli version (gatsby --version): 1.1.40
  • Node.js version: v8.9.1
  • Operating System: MacOS

File contents (if changed):

gatsby-config.js:
package.json:
gatsby-node.js:
gatsby-browser.js:
gatsby-ssr.js:

@pieh
Copy link
Contributor

pieh commented Mar 20, 2018

Hey @madcatsu, would you be interested in submitting PR updating defaults? Or maybe even better - adjusting code so it matches for both paths with trailing slash and without one?

@arrrgi
Copy link
Author

arrrgi commented Mar 20, 2018

@pieh I believe this one might be best left to someone with more experience in contributing to Gatsby following the standard process. I'd be happy to just fork and submit a PR with @prince0203 proposed changes if someone else has time to test otherwise.

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

No branches or pull requests

2 participants