Skip to content

Fix collection traverse #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Euruson
Copy link

@Euruson Euruson commented Aug 20, 2025

Description

The getAllPagesInSpace() function in notion-utils is valuable for sitemap generation and SSG. However, the current implementation fails to retrieve subpages within collections. This is because it searches for blockIds inside CollectionQueryResult, where the results are typically not present.

Upon investigation, I found that the relevant subpage data primarily resides in CollectionQueryResult.collection_group_results, not in the main CollectionQueryResult itself.

BTW, I fixed #616 to remove annoying warnings during building.

Notion Test Page ID

You can verify this behavior by logging the results during the build process.

Copy link

vercel bot commented Aug 20, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
react-notion-x Error Error Aug 20, 2025 1:43pm
react-notion-x-minimal-demo Ready Ready Preview Aug 20, 2025 1:43pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

date-fns warning at build time
1 participant