- Notifications
You must be signed in to change notification settings - Fork4k
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 ourterms of service andprivacy 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?
Uh oh!
There was an error while loading.Please reload this page.
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 functionalityThis 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>
changeset-botbot commentedJun 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
github-actionsbot commentedJun 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
argos-cibot commentedJun 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutArgos 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
pages
array was set to[]
for cross-space reusable content to prevent unwanted cross-site linking.Solution
The fix introduces a
parentSpaceContext
field inGitBookSpaceContext
that 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 existingresolveContentRefInSpace
function to generate proper absolute URLs.Changes
parentSpaceContext
fieldTest plan
🤖 Generated withClaude Code