fix(sync): prune orphaned pages + rewrite relative Laravel doc links#42
Merged
Conversation
Transforms only added/updated target pages and never deleted one whose source was renamed away, leaving an orphaned page in the nav. Add a prune step to both transforms. The laravel transform also never rewrote relative sibling links, so ](Name.md) / ](./Webhooks) resolved to mixed-case routes that 404 on case-sensitive hosting; rewrite them to lowercase /packages/laravel/<slug>. Add ORDER entries for Comparison (6) and the migration page (7). Regenerate content. Verified locally: nuxi build passes, 0 broken internal links, markdownlint clean.
02a1688 to
1b2361b
Compare
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.
Problem
Renaming a Laravel source doc left a duplicate page on the live site: the migration page showed up under both its old slug (
coexisting-with-cashier) and its new one. Two bugs in the sync:transform-laravel-docs.mjs/transform-sdk-docs.mjswrite/update target pages but never delete a target whose source was renamed away — so the old page (and its nav entry) lingered. The sync commits straight tomain, so this was never caught by PR checks.](Subscriptions.md)and](./Webhooks)rendered as/packages/laravel/Subscriptions— which 404s on case-sensitive GitHub Pages.Fix
*.mdin the target dir before regenerating, so renames/removals can't orphan. (Git diffs by content, so unchanged pages don't churn.)](Name.md),](./Name.md),](./Name)→](/packages/laravel/<lowercased>).99bucket.coexisting-with-cashierorphan, renumbers, rewrites links, and picks up the newMigrating from Cashiertitle).Verification (local)
npx nuxi build✓markdownlint-cli2✓