Update Filter Section (#4455)
Add brief explanation and example of filtering multiple pages.
This commit is contained in:
parent
8b00456765
commit
62d98e4af3
1 changed files with 15 additions and 0 deletions
|
@ -140,6 +140,21 @@ __`astro.config.mjs`__
|
||||||
```
|
```
|
||||||
|
|
||||||
The function will be called for every page on your site. The `page` function parameter is the full URL of the page currently under considering, including your `site` domain. Return `true` to include the page in your sitemap, and `false` to leave it out.
|
The function will be called for every page on your site. The `page` function parameter is the full URL of the page currently under considering, including your `site` domain. Return `true` to include the page in your sitemap, and `false` to leave it out.
|
||||||
|
|
||||||
|
To filter multiple pages, add arguments with target URLs.
|
||||||
|
|
||||||
|
__`astro.config.mjs`__
|
||||||
|
|
||||||
|
```js
|
||||||
|
...
|
||||||
|
sitemap({
|
||||||
|
filter: (page) =>
|
||||||
|
page !== "https://stargazers.club/secret-vip-lounge-1" &&
|
||||||
|
page !== "https://stargazers.club/secret-vip-lounge-2" &&
|
||||||
|
page !== "https://stargazers.club/secret-vip-lounge-3" &&
|
||||||
|
page !== "https://stargazers.club/secret-vip-lounge-4",
|
||||||
|
}),
|
||||||
|
```
|
||||||
|
|
||||||
### customPages
|
### customPages
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue