Repository navigation
Conversation
Closes #3850 The `path-meta` transformer gave every file a fallback title taken from its basename, so `.navigation` files got "Navigation". To undo that, `generateNavigationTree` cleared any `.navigation` title equal to "navigation" (case-insensitive). That also cleared titles users had set to "Navigation" on purpose. Changes: - `path-meta`: added a `generateTitleFromBasename()` helper. It never generates a title for `.navigation` files (Markdown and YAML both reach the transformer with basename `.navigation`). - `navigation`: removed the string comparison. An empty title is now deleted from the directory config, so it can't overwrite the index page's title or the generated directory title. Explicit titles are kept as they are. Content that deliberately sets `title: Navigation` in a `.navigation` file will now show that title in the navigation tree. This is intended. Tests: - Navigation tree: an explicit "Navigation" title is kept, and an empty title falls back to the index page's title or the generated one. - path-meta: `.navigation.md` / `.navigation.yml` get no generated title, and the `generateTitleFromBasename` helper is covered.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The reported empty nested-title behavior is unchanged from the base revision, so no current-PR regression remains identified. Pre-merge checks |
|
|
close in favor of #3878 |
Closes #3850
The
path-metatransformer gave every file a fallback title taken from its basename, so.navigationfiles got "Navigation". To undo that,generateNavigationTreecleared any.navigationtitle equal to "navigation" (case-insensitive). That also cleared titles users had set to "Navigation" on purpose.Changes:
path-meta: added agenerateTitleFromBasename()helper. It never generates a title for.navigationfiles (Markdown and YAML both reach the transformer with basename.navigation).navigation: removed the string comparison. An empty title is now deleted from the directory config, so it can't overwrite the index page's title or the generated directory title. Explicit titles are kept as they are.Content that deliberately sets
title: Navigationin a.navigationfile will now show that title in the navigation tree. This is intended.Tests:
.navigation.md/.navigation.ymlget no generated title, and thegenerateTitleFromBasenamehelper is covered.