fix: resolve next/prev navigation on index pages#537
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
… navigation Closes #533 Folder meta.json files listed "index" explicitly in the pages array, causing fumadocs to include the index page twice in the flat navigation list — once as the folder index and once as a child page. This made the "Next" link on index/overview pages point back to themselves instead of the first child page. Fix: remove "index" from the pages array in all folder meta.json files. Fumadocs automatically uses index.mdx as the folder index page without needing it listed in pages.
6a5a2fa to
df27c92
Compare
📦 Next.js Bundle Analysis for librechat.aiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
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.
Closes #533
Problem
The "Next" navigation link on index/overview pages pointed back to the same page instead of the first child page. This affected all folder index pages, including:
/docs/local/docs/remote/docs/configuration/docs/configuration/authentication/docs/configuration/pre_configured_ai/docs/configuration/toolsRoot cause
Every folder
meta.jsonexplicitly listed"index"in itspagesarray. Fumadocs already registersindex.mdxas the folder index page automatically. Listing it again inpagescaused it to appear twice in the flat navigation list — once as the folder index entry and once as a child page entry.When fumadocs built the prev/next links,
findIndexmatched the first occurrence, sonextresolved to the second (duplicate) entry with the same URL — the page linked to itself.Fix
Removed
"index"from thepagesarray in all 18 foldermeta.jsonfiles. Fumadocs handles the index page without needing it explicitly listed.Verified
Tested locally on all pages reported in the issue — "Next" now correctly navigates to the first child page.