From 62d98e4af386da494b50f42338ceae950a2ea9cc Mon Sep 17 00:00:00 2001 From: Adam <81095429+adamlevoy@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:14:50 -0700 Subject: [PATCH] Update Filter Section (#4455) Add brief explanation and example of filtering multiple pages. --- packages/integrations/sitemap/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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