Repository navigation
fix(manifest): title a tool's landing page with the tool's name - #17
Merged
Merged
Conversation
A source whose nav opens with its index page, such as oda_reader's
"Home: index.md", published that page as "Home". The entry the nav
folds into the source's landing now takes the source's sidecar title
("ODA reader", "IMF reader"), and one helper decides the landing for
both the nav and the page title.
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.
A tool's landing page takes the tool's name as its title. oda_reader and imf-reader list
Home: index.mdfirst in their nav, and_source_pagesinsrc/dfo_docs/manifest.pycopied that nav label, so the website rendered both pages as "Home — DFO Docs".Changes
_leads_with_landingdecides which nav entry is a source's landing page._build_source_navuses it to fold that entry into the group, and_source_pagestitles only that entry with the source'ssidecar.title. Every other page keeps its nav label.tests/test_manifest.pycovers aHome: index.mdsource, a top-levelReference: reference/index.mdentry that keeps "Reference", and a nested group index that keeps its label.tests/docsync/test_pages.pyexpects "Guide" for the guide source's root index, the title its group landing already shows.Testing:
uv run pytest(819 tests),ruff check,ruff format --checkandty check src/dfo_docspass.