10843aba63
* Add filter for sitemap * chore: add changeset * fix: types * docs: add sitemapFilter docs Co-authored-by: David Rothmann <david@rothmann.it>
18 lines
373 B
Markdown
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
|
|
```
|