Added slashes at the end of the filter option in the sitemap docs (#7915)
I trend to implement the sitemap and I found out that filter option works only when the URL has slashes at the end. I changed the examples. Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
parent
9d0070095e
commit
6a27e932d6
1 changed files with 5 additions and 5 deletions
|
@ -148,7 +148,7 @@ All pages are included in your sitemap by default. By adding a custom `filter` f
|
|||
// astro.config.mjs
|
||||
// ...
|
||||
sitemap({
|
||||
filter: (page) => page !== 'https://stargazers.club/secret-vip-lounge',
|
||||
filter: (page) => page !== 'https://stargazers.club/secret-vip-lounge/',
|
||||
});
|
||||
```
|
||||
|
||||
|
@ -161,10 +161,10 @@ To filter multiple pages, add arguments with target URLs.
|
|||
// ...
|
||||
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',
|
||||
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/',
|
||||
});
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue