Skip to content

feat: add /latest/ URL redirect to current stable version#5082

Draft
DeepDiver1975 wants to merge 2 commits intomasterfrom
feat/latest-version-redirect
Draft

feat: add /latest/ URL redirect to current stable version#5082
DeepDiver1975 wants to merge 2 commits intomasterfrom
feat/latest-version-redirect

Conversation

@DeepDiver1975
Copy link
Copy Markdown
Member

Summary

  • Adds urls.latest_version_segment: latest and urls.latest_version_segment_strategy: redirect:from to site.yml
  • Antora will now generate static HTML redirect files at /component/latest/** pointing to the current stable version (e.g. /desktop/latest//desktop/6.0/, /server/latest//server/10.16/, etc.)
  • Works for all components and all sub-pages, not just the index
  • Uses the already-configured --redirect-facility static flag — no build script changes needed

Notes

  • redirect:from keeps the versioned URL as canonical; /latest/ acts as an alias
  • Prerequisite: master branches in component repos should have prerelease: true in their antora.yml so Antora correctly identifies the highest stable version as "latest" — please verify before merging

Test plan

  • Build the site locally with npm run antora and confirm public/desktop/latest/ redirect files are generated
  • Verify public/desktop/latest/index.html contains a redirect to /desktop/6.0/
  • Check a sub-page, e.g. public/desktop/latest/faq/ also redirects correctly
  • Confirm component repos' master branches have prerelease: true in antora.yml

🤖 Generated with Claude Code

Add Antora urls.latest_version_segment config so that
/desktop/latest/ (and all other components) redirect to
the current stable version (e.g. /desktop/6.0/).

Uses redirect:from strategy: canonical URLs remain versioned,
static redirect files are generated at /component/latest/**
by Antora's built-in --redirect-facility static.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeepDiver1975 DeepDiver1975 requested a review from mmattel April 13, 2026 14:31
@DeepDiver1975 DeepDiver1975 marked this pull request as ready for review April 13, 2026 14:40
@DeepDiver1975 DeepDiver1975 marked this pull request as draft April 14, 2026 09:04
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