Skip to content

fix: meta.json order sorting for folders without index pages#67

Merged
rsbh merged 3 commits into
mainfrom
fix/meta-json-folder-sort
May 14, 2026
Merged

fix: meta.json order sorting for folders without index pages#67
rsbh merged 3 commits into
mainfrom
fix/meta-json-folder-sort

Conversation

@rsbh
Copy link
Copy Markdown
Member

@rsbh rsbh commented May 14, 2026

Summary

  • Fix folder sorting by meta.json order — folders without index pages were not sorting because the logic relied on node.index.url which was undefined
  • Derive folder path from first child page URL to match against folderOrderMap
  • Remove index page frontmatter order fallback for folder sorting — folders sort only by meta.json order
  • Add sorting documentation for pages and folders

Changes

  • source.ts: derive folder path via getFolderPath(), remove pageOrderMap fallback for folders
  • features.mdx: add "Sorting Pages and Folders" section

Test plan

  • Create meta.json with order in folders — sidebar sorts correctly
  • Works for folders without index pages
  • Index page frontmatter order does NOT affect folder position
  • Index page frontmatter order still sorts the page within the folder
  • Folders without order appear at the end

Derive folder path from first child page URL instead of relying on
node.index which is absent for folders without an index file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 14, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chronicle Ready Ready Preview, Comment May 14, 2026 4:46am

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@rsbh has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 76f90fff-ed47-4321-90cc-5dc52e898895

📥 Commits

Reviewing files that changed from the base of the PR and between 28eae37 and debd22e.

📒 Files selected for processing (2)
  • examples/basic/content/docs/features.mdx
  • packages/chronicle/src/lib/source.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/meta-json-folder-sort

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 and usage tips.

Explains how to sort pages via frontmatter order and meta.json pages
array, and how to sort folders via meta.json order.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove index page frontmatter order fallback for folder sorting.
Folders sort only by meta.json order. Update docs to clarify.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rsbh rsbh merged commit 3ee1722 into main May 14, 2026
4 checks passed
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