Skip to content

Conversation

@jhkrug
Copy link
Contributor

@jhkrug jhkrug commented Nov 21, 2025

I've put in a hook for when processing adoc files.

We can use cross-component xrefs with links to the latest and dev versions. Like:

- xref:latest@rancher-manager:en:/about-rancher/overview.adoc#_run_kubernetes_everywhere[link to rancher-manager]
- xref:dev@admission-controller:en:introduction.adoc#_benefits_and_value[link to dev]
- xref:latest@admission-controller:en:introduction.adoc#_benefits_and_value[link to latest]

Before you would have to use an actual version, like:

- xref:v2.12@rancher-manager:en:/about-rancher/overview.adoc#_run_kubernetes_everywhere[link to rancher-manager]
- xref:1.31@admission-controller:en:introduction.adoc#_benefits_and_value[link to dev]
- xref:1.30@admission-controller:en:introduction.adoc#_benefits_and_value[link to latest]

The hook replaces xref:latest and xref:dev with the xref:actual actual latest and dev versions determined while doing the processing to construct the latest and dev symlinks.

It was always possible to use a link macro to a URL with latest or dev, but there is no build-time link checking.

@jhkrug jhkrug marked this pull request as ready for review November 24, 2025 13:36
@jhkrug jhkrug requested a review from a team as a code owner November 24, 2025 13:36
@jhkrug jhkrug marked this pull request as draft November 25, 2025 22:35
@jhkrug
Copy link
Contributor Author

jhkrug commented Nov 25, 2025

Back to draft while I check:

Does it cope with the situation where the only version is latest (and maybe a dev). So, they are real versions, and not just going to be symlinks. May need a little more exception processing.

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.

2 participants