[W-12011582] add latest version shortcut#7
Conversation
…st-ver-shortcut-gc
|
@hannanelson I was able to upgrade antora to v3.1.2 and implemented a new built-in variable to construct a link to the latest version for the EOL banners and notes. However, I was not able to directly address the issue where if there is no equivalent page in the latest version, then the link will go to "page not found". It may take some more script magic to make that happen and it sounds very hacky to me. Note that the above issue doesn't apply to the old EOL banner for the entire version because that one generates the links during the antora build time where antora can check whether an equivalent page exists, but our current implementation generates the links when the page loads, so it's harder to perform that check. The easiest way to address this seems to be just link the user to the index page of the latest version, that way we don't need to write any extra hacky scripts. |
|
@cheungaryk - that seems like an acceptable solution to me! |
|
ready for review. It should look like the following if the banner is applied to an older (as in not latest) version of a product with versions: if the banner is applied to the latest version of a product, or a product with no version: This is done by applying |


ref: W-12011582
If a page with this EOL banner is part of a component that has multiple versions AND the page is not in the latest version, the banner will include an additional sentence with a link to the
equivalent pageindex page of the latest version.What's not working:
not compatible with the current version of Antora which is v3.0.3 due to the lack of some of the variables used. We can't upgrade to v3.1.x due to a bug, so waiting for v3.2.0 to be released (ETA: unknown)the link's URL is not completely functional - it has .adoc at the end that needs to be manually removed (or remove it using JavaScript)