Closed metmajer closed 1 year ago
hi! I have been also taking a look and maybe we can make this happen from antora level via https://docs.antora.org/antora/2.3/playbook/urls-redirect-facility/ which I think this is something we already use. Might need to take a closer look, but will wait for Michael's thoughts!
Yes this would be helpful :)
We have a few pages which use https://docs.antora.org/antora/2.3/page/page-aliases/, e.g. https://raw.githubusercontent.com/opendevstack/ods-jenkins-shared-library/841a4f8cf6a48c765e192349ec403f676c44953a/docs/modules/jenkins-shared-library/pages/index.adoc. However, I can't figure the URL out at the moment. I'm a bit confused as I thought this worked in the past.
Antora v3 can set latest for the latest version configured (e.g currently 3.x).
urls:
latest_version_segment: latest
latest_version_segment_strategy: redirect:to
The migration to Antora v3 requires some cleanup as it errors out on invalid xrefs which are around in all branches of all repos. Also, the latest page-aliases are set in master as well as 4.x which also errors out (Antora 3).
The 4.x release isn't part of the versioned docs and the master still uses "4.x preview". Is this the intended way forward? Should master provide "5.x preview" and all 4.x branches use "4.x" so that it can be added into the site generator? Do we have to maintain, meaning fix the invalid links in 1.x branches or drops those completely?
Is this the intended way forward? Should master provide "5.x preview" and all 4.x branches use "4.x" so that it can be added into the site generator?
I would say yes
Do we have to maintain, meaning fix the invalid links in 1.x branches or drops those completely?
I would propose to drop
I've created PRs to move to "5.x preview" and "4.x" instead of "4.x preview"
URLs using latest are in place now.
When linking to the documentation of a specific Quickstarter or other documentation artefacts, it would be great to support a stable URL that always leads readers to the latest (currently active) version. Example:
vs.
Why useful? We would like to link to these documents from other documentation. A potential solution mentioning
jekyll-redirect-from
is mentioned here: https://stackoverflow.com/questions/29390425/github-pages-url-rewrite-supportThoughts @gerardcl @michaelsauter ?