Document how Antora selects the latest version
Antora is aware of which component version is the latest one. The rules for how Antora determines the latest version, and how this selection can be controlled, should be documented.
Here are the rules for how the versions are sorted:
- Drop the leading "v"
- Sort in descending order following semantic versioning rules
- Bubble versions that do not begin with a digit to the top and sort in ascending alphabetic order
- Promote the special version name "master" to the top of the list
From this list, Antora selects the latest version number (starting from the top of the sorted list):
- Select the first version that is not marked as a prerelease
- If all versions are prereleases, take the first version in the list
To mark a version as a prerelease, define the prerelease
key in the component descriptor (antora.yml)
prerelease: true
The prerelease key can also be set to a string value. This value is appended to the version number when displayed.
prerelease: -beta-1