Skip to content

feat(docs): introduce versioned documentation for v5.x releases#3308

Open
aerben wants to merge 1 commit intooperator-framework:mainfrom
aerben:feat/versioned-docs
Open

feat(docs): introduce versioned documentation for v5.x releases#3308
aerben wants to merge 1 commit intooperator-framework:mainfrom
aerben:feat/versioned-docs

Conversation

@aerben
Copy link
Copy Markdown

@aerben aerben commented Apr 22, 2026

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:

  • docs/hugo.toml: add [[params.versions]] entries for latest/v5.0-v5.3, update version param from placeholder "0.0" to "latest"
  • docs/content: replace all 12 absolute https://javaoperatorsdk.io/... links with content-relative paths so they resolve correctly under any baseURL (fixes links in reconciler.md, workflows.md, dependent-resources.md, faq/_index.md, v3-1-migration.md, v4-4-migration.md, v4-5-migration.md)
  • .github/workflows/hugo.yaml: extend the build job to extract each v5.x tagged release via git-archive, patch its hugo.toml for archived mode, build with a versioned baseURL, and place the output in a subdirectory of the main public/ artifact before deploying to GitHub Pages

Closes #2905

Copilot AI review requested due to automatic review settings April 22, 2026 13:34
@openshift-ci openshift-ci Bot requested review from metacosm and xstefank April 22, 2026 13:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml and updates the docs “version” label to latest.
  • 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.

Comment thread docs/hugo.toml Outdated
Comment thread .github/workflows/hugo.yaml Outdated
Comment thread .github/workflows/hugo.yaml Outdated
@aerben aerben force-pushed the feat/versioned-docs branch from 1f918a4 to 4ec951c Compare April 22, 2026 13:47
@aerben aerben requested a review from Copilot April 22, 2026 13:48
@aerben aerben force-pushed the feat/versioned-docs branch 2 times, most recently from 6905d81 to ee3358d Compare April 22, 2026 13:52
@aerben aerben marked this pull request as draft April 22, 2026 13:52
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 22, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/hugo.yaml Outdated
@aerben aerben force-pushed the feat/versioned-docs branch from ee3358d to 8c69b70 Compare April 22, 2026 13:58
@aerben
Copy link
Copy Markdown
Author

aerben commented Apr 22, 2026

The actions build still has some hickups that I am fixing on a personal copy of the project.

@csviri
Copy link
Copy Markdown
Collaborator

csviri commented Apr 22, 2026

Thank you @aerben!! will try to take a look soon

@aerben aerben force-pushed the feat/versioned-docs branch from 8c69b70 to 671a18b Compare April 22, 2026 18:16
@aerben
Copy link
Copy Markdown
Author

aerben commented Apr 22, 2026

Alright, I got it working @csviri https://aerben.github.io/josdk-docs-test/

@xstefank xstefank requested a review from csviri April 23, 2026 07:16
@xstefank
Copy link
Copy Markdown
Collaborator

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?

@aerben
Copy link
Copy Markdown
Author

aerben commented Apr 23, 2026

@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

@aerben aerben force-pushed the feat/versioned-docs branch from 671a18b to 8e642ef Compare April 23, 2026 08:08
@aerben aerben requested a review from Copilot April 23, 2026 08:09
@aerben aerben marked this pull request as ready for review April 23, 2026 08:09
@openshift-ci openshift-ci Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 23, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Comment thread docs/content/en/docs/documentation/dependent-resource-and-workflows/workflows.md Outdated
Comment thread docs/content/en/docs/faq/_index.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Comment thread .github/workflows/hugo.yaml Outdated
Comment thread .github/workflows/hugo.yaml
Comment thread .github/workflows/hugo.yaml
@aerben aerben force-pushed the feat/versioned-docs branch from d581499 to 7f731bc Compare April 23, 2026 08:26
Comment thread .github/workflows/hugo.yaml Outdated
Copy link
Copy Markdown
Collaborator

@metacosm metacosm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@csviri
Copy link
Copy Markdown
Collaborator

csviri commented Apr 23, 2026

@aerben loks awesome thank you!!

just some nitpicking: when selecting the version, would it be possible to show the actual version?

@aerben aerben force-pushed the feat/versioned-docs branch from 7f731bc to 92c6413 Compare April 23, 2026 12:41
| grep -E '^v5\.[0-9]+\.[0-9]+$' | head -1)
VERSIONS+=("${latest}:${minor}")
done
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please echo here the final values.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Copy Markdown
Collaborator

@csviri csviri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added just some minor nitpicks, it looks great thank you @aerben !

@aerben
Copy link
Copy Markdown
Author

aerben commented Apr 23, 2026

I will make your requested changes and go through the pages one last time to check that all links are correct

@aerben aerben force-pushed the feat/versioned-docs branch from 92c6413 to 605a827 Compare April 23, 2026 18:43
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>
@aerben aerben force-pushed the feat/versioned-docs branch from 605a827 to 8db13b9 Compare April 23, 2026 18:48
@aerben
Copy link
Copy Markdown
Author

aerben commented Apr 23, 2026

Alright, from my side this is ready to merge

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.

Introduce versioned documentation

5 participants