Skip to content

Commit

Permalink
simplify example
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Apr 30, 2024
1 parent 1830cf2 commit d9816f9
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions website/docs/api/plugins/plugin-sitemap.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,8 @@ const config = {
filename: 'sitemap.xml',
createSitemapItems: async (params) => {
const {defaultCreateSitemapItems, ...rest} = params;
const sitemapItems = await defaultCreateSitemapItems(rest);
const sitemapsWithoutPage = sitemapItems.filter(
(sitemapItem) => !sitemapItem.url.includes('/page/'),
);
return sitemapsWithoutPage;
const items = await defaultCreateSitemapItems(rest);
return items.filter((item) => !item.url.includes('/page/'));
},
};
```
Expand Down

0 comments on commit d9816f9

Please sign in to comment.