-
Couldn't load subscription status.
- Fork 4k
Fix reusable content cross-space page reference resolution #3321
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
base: main
Are you sure you want to change the base?
Conversation
- Add parentSpaceContext to GitBookSpaceContext type for tracking parent space information - Update ReusableContent component to include parent space context when rendering content from different spaces - Enhance resolveContentRef to check parent space when page resolution fails in current space - Add comprehensive unit tests for the new parent space fallback functionality This resolves broken links to pages in the parent space of reusable content when used across different sites. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
Summary of the deployments: Version 1
Version 2
Test content |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Summary
Background
When reusable content contains links to pages in its parent space, these links were broken when the reusable content was used in a different space/site. This happened because the
pagesarray was set to[]for cross-space reusable content to prevent unwanted cross-site linking.Solution
The fix introduces a
parentSpaceContextfield inGitBookSpaceContextthat preserves information about the parent space (where the reusable content originates). When page resolution fails in the current space, the system now checks the parent space and uses the existingresolveContentRefInSpacefunction to generate proper absolute URLs.Changes
parentSpaceContextfieldTest plan
🤖 Generated with Claude Code