fix: use canonical slug for folder-page graphs - #14
Open
kalinof wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
body[data-slug]when selecting the current Graph node/indexpages, ordinary pages, base-path segment boundaries, and the actual browser URL/base-path utility wiringProblem
A folder-backed page can have these two identities during SPA navigation:
The content index simplifies the canonical
/indexidentity toprojects/example/. The Graph component previously rooted the local graph using only the browser URL, so its lookup could miss the valid folder key and render the current page as an isolated node even though links and backlinks were present incontentIndex.json.Using explicit
/indexlinks in content does not fix the current-node mismatch and makes authors compensate for a presentation-layer identity bug.Fix
Use Quartz's canonical body slug when available. It is the same page identity used to build the generated content index and remains correct across SPA navigation. Keep URL/base-path handling for environments where body metadata is unavailable.
Validation
The correction was also exercised in a real Quartz site with folder-backed and ordinary pages, SPA click-through, and light/dark themes.
Related reports
/indexcontent workaround does not address this current-node lookup mismatch.