Repository navigation
docs: give the home page a real title instead of a description - #506
Conversation
#504 gave docs/index.md the front-matter title "clang-format and clang-tidy GitHub Action" for the browser <title>. MkDocs also uses that title as the page's navigation label, so the sidebar on every page and the footer's "Previous" link on Inputs and Outputs showed the long title (wrapping to two lines in the sidebar) instead of "cpp-linter-action". An explicit nav label restores the short name, as clang-tools-pip does. Material still builds <title> from the front matter, so the home page <title> and meta description are unchanged, and the nav keeps all its entries.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe documentation title now reads ChangesDocumentation identity
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to
|
| # An explicit label: the home page's front-matter title is the longer, search-facing | ||
| # "clang-format and clang-tidy GitHub Action", which only <title> should use. | ||
| - cpp-linter-action: index.md |
There was a problem hiding this comment.
This is how AI bends over backwards to avoid making what it perceives as a breaking change.
The fact remains: the title metadata in index.md frontmatter is a description, not a title. Better to just update the metadata instead.
The front-matter title from #504, "clang-format and clang-tidy GitHub Action", described the action rather than naming the page, and MkDocs uses it as the home page's nav label too. Use the action's name as the title and move the descriptive wording into the meta description. The explicit nav label from the previous commit is no longer needed.
Before: #504 set the home page's front-matter
titleto "clang-format and clang-tidy GitHub Action". That is a description of the action, not a page title, and MkDocs also uses it as the nav label, so the sidebar on every page and the footer's "Previous" link on Inputs and Outputs called the home page "clang-format and clang-tidy GitHub Action" (two lines in the sidebar).After: the front-matter
titleiscpp-linter-action, and the descriptive wording moved intodescription. The sidebar and footer say "cpp-linter-action" again, as they did before #504, with no nav label inmkdocs.yml.Before / After
mkdocs build --strictofmain(751fb7b) and of this branch, both with the locked docs dependencies (uv run --group docs). Both builds pass with no warnings.main)<title>Nothing else in the built site changes; the search index is identical.
The screenshots of
/inputs-outputs/were taken from the first version of this PR, which got the same sidebar and footer through a nav label; the rendered nav is identical.Summary by CodeRabbit