Skip to content

feat(docs): group older doc versions under "Older versions" - #767

Open
myasnikovdaniil wants to merge 1 commit into
mainfrom
feat/docs-older-versions
Open

myasnikovdaniil wants to merge 1 commit into
mainfrom
feat/docs-older-versions

Conversation

@myasnikovdaniil

Copy link
Copy Markdown
Contributor

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 the order field that register_version.sh already 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, Makefile routing treats a hidden entry as unreleased, so patch releases of old versions would go to next/. 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 defaultContentLanguageInSubdir the existing RelPermalink prefix 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 (highest order) v1.5 moves into older versions. Also built with HUGO_ENV=production and --minify, ran hack/check-i18n.sh and hack/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_versions is in all language files (machine translated like the rest). I also dropped hardcoded "current release is v1.2" from CLAUDE.md and CONTRIBUTING.md, v1.2 is under older versions now.

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>
@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cozystack ready!

Name Link
🔨 Latest commit 58d9ccd
🔍 Latest deploy log https://app.netlify.com/projects/cozystack/deploys/6ad8c7c65d30003b9b2185f2
😎 Deploy Preview https://deploy-preview-767--cozystack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7f0d4459-6c4e-4b94-82a5-db7c7f166abf
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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