astro/.changeset/cool-ravens-occur.md
Nate Moore 10843aba63
Add sitemap filter option (#2755)
* Add filter for sitemap

* chore: add changeset

* fix: types

* docs: add sitemapFilter docs

Co-authored-by: David Rothmann <david@rothmann.it>
2022-03-10 14:14:45 -06:00

18 lines
373 B
Markdown

---
'astro': patch
---
Add user-configurable `sitemapFilter` option.
This option can be used to ensure certain pages are excluded from your final sitemap.
```ts
// astro.config.ts
import type { AstroUserConfig } from 'astro'
const config: AstroUserConfig = {
sitemap: true,
sitemapFilter: (page: string) => !page.includes('secret-page')
}
export default config
```