Skip to content

Commit

Permalink
Fix empty sitemap (#2685)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge authored Jan 7, 2025
1 parent 648f0e9 commit c30bc24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/angry-spies-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'gitbook': patch
---

Fix empty sitemap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function GET(req: NextRequest) {
const { pages: rootPages } = await getSpaceContentData(pointer, pointer.siteShareKey);

const pages = flattenPages(rootPages, (page) => !page.hidden && isPageIndexable([], page));
const urls = Promise.all(
const urls = await Promise.all(
pages.map(async ({ page, depth }) => {
// Decay priority with depth
const priority = Math.pow(2, -0.25 * depth);
Expand Down

0 comments on commit c30bc24

Please sign in to comment.