summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam <81095429+adamlevoy@users.noreply.github.com> 2022-08-24 13:14:50 -0700
committerGravatar GitHub <noreply@github.com> 2022-08-24 16:14:50 -0400
commit62d98e4af386da494b50f42338ceae950a2ea9cc (patch)
tree377810c0ba2cf647f7f27c1f7df630e15d7282c3
parent8b004567655d7c580dc776d9821f7d9761b8baea (diff)
downloadastro-62d98e4af386da494b50f42338ceae950a2ea9cc.tar.gz
astro-62d98e4af386da494b50f42338ceae950a2ea9cc.tar.zst
astro-62d98e4af386da494b50f42338ceae950a2ea9cc.zip
Update Filter Section (#4455)
Add brief explanation and example of filtering multiple pages.
-rw-r--r--packages/integrations/sitemap/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/integrations/sitemap/README.md b/packages/integrations/sitemap/README.md
index 3d1bda8a6..8482225a3 100644
--- a/packages/integrations/sitemap/README.md
+++ b/packages/integrations/sitemap/README.md
@@ -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.
+
+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