Skip to content

Fix the bug of traversing collections #658

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 1 commit into
base: master
Choose a base branch
from

Conversation

Euruson
Copy link

@Euruson Euruson commented Aug 5, 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.

Notion Test Page ID

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

Copy link

vercel bot commented Aug 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
react-notion-x ✅ Ready (Inspect) Visit Preview Aug 5, 2025 2:14pm
react-notion-x-minimal-demo ✅ Ready (Inspect) Visit Preview Aug 5, 2025 2:14pm

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.

1 participant