Skip to content

fix(manifest): title a tool's landing page with the tool's name - #17

Merged
jm-rivera merged 1 commit into
devfrom
fix/tool-page-titles
Nov 1, 2026
Merged

jm-rivera merged 1 commit into
devfrom
fix/tool-page-titles

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

A tool's landing page takes the tool's name as its title. oda_reader and imf-reader list Home: index.md first in their nav, and _source_pages in src/dfo_docs/manifest.py copied that nav label, so the website rendered both pages as "Home — DFO Docs".

Changes

  • _leads_with_landing decides which nav entry is a source's landing page. _build_source_nav uses it to fold that entry into the group, and _source_pages titles only that entry with the source's sidecar.title. Every other page keeps its nav label.
  • Against the website's pinned manifest, three titles change: oda_reader "Home" to "ODA reader", imf-reader "Home" to "IMF reader", and dcp-tools "dcp-tools" to "DCP tools". The hub's "Home" is built elsewhere and stays.
  • tests/test_manifest.py covers a Home: index.md source, a top-level Reference: reference/index.md entry that keeps "Reference", and a nested group index that keeps its label. tests/docsync/test_pages.py expects "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 --check and ty check src/dfo_docs pass.

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.
@jm-rivera
jm-rivera merged commit 6d88d60 into dev Nov 1, 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.

1 participant