Repository navigation
fix(docs): honor the next frontmatter override on Next cards - #20
Merged
Merged
Conversation
src/content.config.ts documents `next` as an override for the next guide link, but [slug].astro always used sequence order, so 25 of the 27 pages that set it showed a different Next card. Use the override when set and fail the build when it names an unknown doc. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
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.
Before: the "Next" card at the bottom of every docs page followed sidebar order. The
next:slug that 27 pages set in frontmatter was ignored, so 25 of them showed a different Next card than intended (for example Sign-in recovery pointed to Mobile dashboard instead of Template configuration, and Dashboard tour pointed to Comparison instead of Create your first server).After: when a page sets
next:, its Next card links to that page; pages without it keep the sidebar order. Anext:slug that matches no doc fails the build instead of silently falling back.src/content.config.tsalready documentsnextas "Optional override slug for the next guide link", so this makessrc/pages/docs/[slug].astromatch that contract. Prev cards are unchanged.How:
getStaticPaths()looks the override up in the ordered docs list and uses it for thenextprop, else the following doc. Split out from #19 at valgul's choice;main(with #19) is merged in and the conflict resolved.npm run build(99 pages) andnpm run check(0 errors) pass locally.Part of #8.
🤖 Generated with Claude Code