feat(docs): introduce versioned documentation for v5.x releases#3308
feat(docs): introduce versioned documentation for v5.x releases#3308aerben wants to merge 1 commit intooperator-framework:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Docsy documentation versioning so the site can publish “latest” docs alongside archived snapshots for each v5.x minor release (e.g., /v5.3/), including a navbar version selector and archived-version banner behavior.
Changes:
- Adds Docsy version selector entries to
docs/hugo.tomland updates the docs “version” label tolatest. - Rewrites documentation links from absolute
https://javaoperatorsdk.io/...to content-relative paths so they resolve under any versioned baseURL. - Extends the GitHub Pages workflow to build and publish multiple tagged v5.x doc snapshots into versioned subdirectories.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
docs/hugo.toml |
Defines latest and v5.0–v5.3 entries for Docsy’s version selector and updates the displayed version label. |
docs/content/en/docs/migration/v4-5-migration.md |
Converts an internal link to a content-relative path for versioned builds. |
docs/content/en/docs/migration/v4-4-migration.md |
Converts an internal link to a content-relative path for versioned builds. |
docs/content/en/docs/migration/v3-1-migration.md |
Converts an internal link to a content-relative path for versioned builds. |
docs/content/en/docs/faq/_index.md |
Converts a release-notes link to a content-relative path for versioned builds. |
docs/content/en/docs/documentation/reconciler.md |
Converts an internal docs link to a content-relative path for versioned builds. |
docs/content/en/docs/documentation/dependent-resource-and-workflows/workflows.md |
Converts internal links to content-relative paths for versioned builds. |
docs/content/en/docs/documentation/dependent-resource-and-workflows/dependent-resources.md |
Converts internal links to content-relative paths for versioned builds. |
.github/workflows/hugo.yaml |
Builds “latest” plus archived v5.x docs from tags and publishes them under versioned subdirectories on Pages. |
1f918a4 to
4ec951c
Compare
6905d81 to
ee3358d
Compare
ee3358d to
8c69b70
Compare
|
The actions build still has some hickups that I am fixing on a personal copy of the project. |
|
Thank you @aerben!! will try to take a look soon |
8c69b70 to
671a18b
Compare
|
Alright, I got it working @csviri https://aerben.github.io/josdk-docs-test/ |
|
Thanks @aerben, I think this is a great idea. I noticed in your preview that v5.2 downwards changes colors. Is that expected? Why is this PR a draft? |
|
@xstefank thank you for taking a look. The PR is a draft because the implementation is mostly finished, but I found some glitches on the page like e.g. a vanishing search box when switching between versions that I want to work on before making the PR ready for review. EDIT: It's fine now and I will let Copilot have a go at the code again |
671a18b to
8e642ef
Compare
8e642ef to
d581499
Compare
d581499 to
7f731bc
Compare
metacosm
left a comment
There was a problem hiding this comment.
I'm not really knowledgeable wrt Hugo so I'll let others decide whether this is appropriate or not. The demo site seems to work well enough, though I wish changing the version wouldn't reset the page the user is currently on (that said, I understand that it's probably way easier like that).
|
@aerben loks awesome thank you!! just some nitpicking: when selecting the version, would it be possible to show the actual version? |
7f731bc to
92c6413
Compare
| | grep -E '^v5\.[0-9]+\.[0-9]+$' | head -1) | ||
| VERSIONS+=("${latest}:${minor}") | ||
| done | ||
There was a problem hiding this comment.
Please echo here the final values.
|
I will make your requested changes and go through the pages one last time to check that all links are correct |
92c6413 to
605a827
Compare
Build archived docs for v5.0–v5.3 alongside the latest docs and deploy them as subdirectories under GitHub Pages. A version selector dropdown lets readers switch between releases. Signed-off-by: Alexander Erben <alex@it-erben.com>
605a827 to
8db13b9
Compare
|
Alright, from my side this is ready to merge |
Implements Docsy's versioning feature so each v5.x minor release has its own archived snapshot at javaoperatorsdk.io/v5.X/, with a version dropdown in the navbar and an archived-version banner for old releases.
Changes:
Closes #2905