Repository navigation
Site targets, download links and hand-written pages in the navigation - #138
Merged
Merged
Conversation
…ist hand-written pages - site.targets: a MkDocs site project builds a site per config file (for example mkdocs.yml and mkdocs.tarf.yml, which INHERITs it), sharing the pages and navigation. `py-doc site build --target NAME` builds one; two targets that build to the same folder are refused before building. - site.downloads: each document's first page links the Word, PDF, PowerPoint or HTML files `py-doc build` made for it, copied beside the site. A file not built yet is left out with a warning. - site.pages: pages of the user's own (a blog, an about page) are added to the navigation after the documents. - The tool image gains mkdocs-redirects, so moved pages keep their old addresses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
These are the features needed to publish markbac.github.io and tarf.co.uk from one py-doc project:
site.targets(MkDocs): one site project builds several sites, each from its own config file that INHERITsmkdocs.ymland changes only what differs (address,site_dir, home page).py-doc site buildbuilds every target, and--target NAMEbuilds one. A target whose file is missing, doesn't take in the navigation, or reads pages from anotherdocs_diris reported. Two targets that build to the same folder are refused before building.site.downloads: the first page of each document links the filespy-doc buildmade for it (pdf,docx,pptx,html), copied intodownloads/beside the pages (public/<doc>/downloads/for Starlight). A file not built yet is left out with a warning that names the build command.site.pages: hand-written pages, such as a blog for Material's blog plugin, are added to the navigation py-doc writes, after the documents.mkdocs-redirects==1.2.2, so old URLs can redirect.The user guide (Web sites chapter) and the requirements (FR-125 to FR-127, with traceability) are updated.
Testing
pytest: 1026 passed, 13 skipped. The site and config tests were rerun after the last change: 53 passed.ruff check: clean.py-doc lint --engine builtin --stricton the changed docs: 0 issues.🤖 Generated with Claude Code