[ 
https://issues.apache.org/jira/browse/CAMEL-16228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17285860#comment-17285860
 ] 

Zoran Regvart commented on CAMEL-16228:
---------------------------------------

The only version that's fixed to {{latest}} is the user manual. 

We build against different versions of (Camel) components and sub-projects. 
From those we need to point to a specific (compatible) version. I think mostly 
we point from (Camel) components to (Camel) components and from sub-projects to 
(Camel) component documentation.

For {{xref}} within the same (Antora) component and module, we should use the 
shortest version, e.g. {{xref:path}} (as in this 
[section|https://docs.antora.org/antora/2.2/asciidoc/page-to-page-xref/#same-module]),
 this results in addressing the same (Antora) component and version.

For Camel, Spring Boot and Karaf, that are released at the same time as Camel, 
so the version is the same, I _think_ we can use the intrinsic attribute 
{{:page-component-version:}} (per Antora 
[documentation|https://docs.antora.org/antora/2.3/page/intrinsic-attributes/#page-attributes]),
 e.g. {{xref:\{page-component-version\}@components::....adoc}}.

For other sub projects (K, Kafka Connector, Quarkus), we need to manage 
separately the version of Camel is referenced there. I don't know of a per- 
(Antora) component Asciidoc attribute feature, so I don't think we can set an 
attribute like {{camel-version}} in (say) Camel K's documentation to (say) 
{{3.7.x}}, and have it maintained for across releases. So for this aspect of 
the problem I don't have a solution.

Either way, we would need to go through a large number of {{xref}} links across 
multiple branches we build and make sure that the version is parameterized. I 
remember doing scripts and some Java code around that when we first created the 
documentation, so something like that to automate the process would be needed.

[~djencks] your thoughts would be appreciated here.

> Documentation: Fix xref link in old branches
> --------------------------------------------
>
>                 Key: CAMEL-16228
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16228
>             Project: Camel
>          Issue Type: Task
>          Components: documentation, website
>            Reporter: Andrea Cosentino
>            Priority: Major
>             Fix For: 3.x
>
>
> Currently in the .adoc of our documentation we are using (for example)
> xref:components::kafka-component.adoc[KafkaIdempotentRepository]
> This is ok for master branch and latest documentation.
> The problem arises when we look at older active branch, all the link to 
> components in 3.7.x for example are still pointi to latest. We need to change 
> the docs in the following way 
> xref:3.7.x@components::kafka-component.adoc[KafkaIdempotentRepository]
> We need to do this for 3.8.x, 3.7.x and 3.4.x



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to