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

sitemap integration removes pages ending with 404 or 500 #10778

Open
1 task done
adrianlyjak opened this issue Apr 12, 2024 · 0 comments
Open
1 task done

sitemap integration removes pages ending with 404 or 500 #10778

adrianlyjak opened this issue Apr 12, 2024 · 0 comments
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@adrianlyjak
Copy link
Contributor

Astro Info

Astro                    v4.2.3
Node                     v20.11.1
System                   macOS (arm64)
Package Manager          npm
Output                   hybrid
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/react
                         @astrojs/sitemap

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

I am using numerical IDs for items on a static site. One of the items (a store location) has an ID of "404". Its getting stripped from the sitemap, since 404 pages are a somewhat special identifier to be used as a not found page in some cases for astro.

It seems that perhaps the exclusionary logic is a little too strict. Can this be made to instead only match this type of pattern?

/404
/500
/[locale]/404
/[locale]/500

In my case the page follows this pattern

/store/[state]/[city]/[store-id]

What's the expected result?

Not all pages that end in 404 should be excluded from the site map

Link to Minimal Reproducible Example

https://github.com/adrianlyjak/astro/tree/404-fix/packages/integrations/sitemap/test/fixtures/static

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Apr 12, 2024
@ematipico ematipico added - P3: minor bug An edge case that only affects very specific usage (priority) and removed needs triage Issue needs to be triaged labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants