Skip to content

fix(docs): honor the next frontmatter override on Next cards - #20

Merged
ValgulNecron merged 2 commits into
mainfrom
claude/docs-next-override
Oct 15, 2026
Merged

ValgulNecron merged 2 commits into
mainfrom
claude/docs-next-override

Conversation

@ValgulNecron

@ValgulNecron ValgulNecron commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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. A next: slug that matches no doc fails the build instead of silently falling back.

src/content.config.ts already documents next as "Optional override slug for the next guide link", so this makes src/pages/docs/[slug].astro match that contract. Prev cards are unchanged.

How: getStaticPaths() looks the override up in the ordered docs list and uses it for the next prop, 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) and npm run check (0 errors) pass locally.

Part of #8.

🤖 Generated with Claude Code

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>
@ValgulNecron ValgulNecron self-assigned this Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8476f976-fc8c-4ebe-8fc3-3287ed3878cc
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
@ValgulNecron
ValgulNecron merged commit 3220d43 into main Oct 15, 2026
2 checks passed
@ValgulNecron
ValgulNecron deleted the claude/docs-next-override branch October 15, 2026 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants