Repository navigation
feat: version banners for dev/legacy, per-branch edit links - #18
Merged
Merged
Conversation
The legacy banner never rendered: it read extra.legacy_version from #__config, which Material doesn't populate. The banner script now works out the current version from the URL and mike's versions.json, showing a "Development version" notice on dev and a "Legacy version" notice (with a link to latest) on anything that isn't the latest alias. No per-version config is involved, so main can stay a straight copy of edgetx_2.12. Also turn on content.action.edit (Material hides the edit button without it) and take edit_uri from DOCS_EDIT_URI, which the publish workflow sets to the branch being built, so "Edit this page" on /dev/ opens main and on /2.12/ opens edgetx_2.12. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 23, 2026
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
Version banners
legacy-version-banner.jsreadextra.legacy_versionfrom#__config, but Material only putsbase,features,search,translationsandversionthere, so the check always bailed out.config.baseagainst the page URL to get/<version>/, then looks that version up in mike'sversions.json:latestalias shows a "Legacy version" banner with a link to/latest/. When 2.13 ships, 2.12 picks this up automatically.mkdocs servethere's noversions.json, so there's no banner either.maincan stay an exact copy ofedgetx_2.12(see chore: make main a copy of edgetx_2.12 (MkDocs, published as dev) #17). Thelegacy_versionconfig blocks were never read, so I removed them frommkdocs.yml,import_legacy_gitbook.pyandprepare_branch_site.py."Edit this page" goes to the right branch
content.action.edit. Without it, Material 9 never renders the edit button, so the site had no edit links at all.edit_uriis now!ENV [DOCS_EDIT_URI, "edit/edgetx_2.12/website/md-docs/"]. The publish workflow setsDOCS_EDIT_URItoedit/${{ github.ref_name }}/website/md-docs/, so/dev/edits openmainand/2.12/edits openedgetx_2.12. Legacy imports still setedit_uri: "", because their source is a temporary workspace, so they get no edit link.Testing
mike serve:/dev/: dev banner, edit link points toedit/main/..../2.8/: legacy banner, link goes to/latest/, no edit button./latest/and/2.12/: no banner, edit link points toedit/edgetx_2.12/....uv run mkdocs build --strictpasses.After merging
edgetx_2.12intomain(chore: make main a copy of edgetx_2.12 (MkDocs, published as dev) #17, or a follow-up PR) sodevgets the same files.gh-pageswere built with the old script. Re-import andmike deploy2.4–2.11, then re-run the publish workflow, so their banners show up.docs-system/overlays/or the firmware's/*luadoc*/comments (see CONTRIBUTING.md). The generated-file marker at the top of those files says so, but contributors will land on the generated file first.🤖 Generated with Claude Code