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:
Marek Brzezinski 2023-08-07 19:52:13 +02:00 committed by GitHub
parent 9d0070095e
commit 6a27e932d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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/',
});
```