Repository navigation
feat(docs): group older doc versions under "Older versions" - #767
Open
myasnikovdaniil wants to merge 1 commit into
Open
myasnikovdaniil wants to merge 1 commit into
myasnikovdaniil wants to merge 1 commit into
Conversation
The version switcher, the /docs/ version table and the /docs/ sidebar tree listed all eight versions. Keep the newest params.versions_visible (2) released versions in view and put the rest behind an "Older versions" disclosure. Recent vs older is derived from the `order` field that hack/register_version.sh already assigns, so a new release shifts the oldest visible version into the group without touching hugo.yaml. `hidden` is left alone: Makefile routing treats a hidden entry as unreleased. The sidebar tree never prunes the version the page belongs to, decided by content path rather than URL, so builds under a subpath baseURL or with defaultContentLanguageInSubdir keep their navigation. versions_visible is clamped to at least 1 and documented in CLAUDE.md and CONTRIBUTING.md, which also stop naming v1.2 as the current release. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
✅ Deploy Preview for cozystack ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
myasnikovdaniil
marked this pull request as ready for review
October 21, 2026 14:13
myasnikovdaniil
requested review from
Andrei Kvapil (kvaps),
Timofei Larkin (lllamnyp) and
Timur Tukaev (tym83)
as code owners
October 21, 2026 14:13
This branch has not been deployed
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.
Version dropdown, version table on
/docs/and sidebar tree on/docs/listed every released version. The sidebar was the worst, it rendered full trees of all eight versions (1258 list items, a version page has 172).This PR keeps the newest two released versions in view and puts the rest under "Older versions". The count is
params.versions_visible(default 2, minimum 1), versions are ranked by theorderfield thatregister_version.shalready sets, so after a new release the oldest visible version moves into the group on its own and nothing in the release scripts changes. In the dropdown it is a plain<details>that opens by itself when you are on an older version, on/docs/it is a collapsed block under the table, and in the/docs/sidebar the older roots are just left out (338 list items now).I did not reuse
hidden,Makefilerouting treats a hidden entry as unreleased, so patch releases of old versions would go tonext/. Nothing is removed from the build and no URL changes.The sidebar never prunes the version the page belongs to, and it decides that by content path. With a subpath baseURL or
defaultContentLanguageInSubdirthe existingRelPermalinkprefix match misses and the tree is rooted at/docs/, there pruning by URL cut the current version out of its own navigation.I compared built HTML of this branch and
origin/main: same set of pages, same switcher links on every page, same sidebar on every version page, only/docs/loses the older roots. With a fake v1.7 (highestorder) v1.5 moves into older versions. Also built withHUGO_ENV=productionand--minify, ranhack/check-i18n.shandhack/i18n/test_i18n.py. I did not click through the dropdown in a real browser, for the summary click and keyboard I only read the Bootstrap 5.3.6 dropdown code.New i18n key
docs_older_versionsis in all language files (machine translated like the rest). I also dropped hardcoded "current release is v1.2" fromCLAUDE.mdandCONTRIBUTING.md, v1.2 is under older versions now.