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

Sitemaps include filtered pages and drafts #7087

Closed
1 task
neulandherzer-dev opened this issue May 14, 2023 · 2 comments
Closed
1 task

Sitemaps include filtered pages and drafts #7087

neulandherzer-dev opened this issue May 14, 2023 · 2 comments
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)

Comments

@neulandherzer-dev
Copy link

neulandherzer-dev commented May 14, 2023

What version of astro are you using?

2.4.5

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

any

Describe the Bug

The filter does not work. Filtered pages are included in the sitemap!

Also, draft pages are included in the sitemap.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/astro-sitemap-bug-fxfr?file=astro.config.mjs

Participation

  • I am willing to submit a pull request for this issue.
@timozander
Copy link
Contributor

Caused by 1b90a7a
The filtering is only applied to pages and not to routes.

Should be resolved by moving https://github.com/withastro/astro/blob/main/packages/integrations/sitemap/src/index.ts#L129 to line 119

@ematipico ematipico added the - P4: important Violate documented behavior or significantly impacts performance (priority) label Jun 12, 2023
@natemoo-re
Copy link
Member

Thankfully, this behavior was fixed by @andremralves in #7263! 🎉

Please update your @astrojs/sitemap dependency to the latest version for the fix.

As for draft pages being included, we are hoping to revisit the draft feature for Astro 3.0. Let's discuss that in #7324.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P4: important Violate documented behavior or significantly impacts performance (priority)
Projects
None yet
Development

No branches or pull requests

4 participants