Define a Component with No Version
Sometimes the project or process you’re documenting isn’t versioned.
For example, hosted technology services and team handbooks may only need their content to represent how the service or process works as of right now.
This is where the reserved version value of a tilde,
~, comes into play.
To define a component version that doesn’t have a version, assign a tilde,
~, to the
~ is shorthand for the value
null, which has the same effect.
name: component-name version: ~ (1)
|1||On a new line, type the key
Antora doesn’t apply the same behavior and output rules to an unversioned component version that it does to a component version with a named or semantic version. For example, Antora doesn’t include the version segment in the page and asset URLs of an unversioned component version (e.g., /component-name/module-name/page-name.html).
version key is required for a component version since versioning is central to how Antora works.
The behavior and output rules that are influenced by the version are described in How Antora uses version.
However, Antora accounts for the fact that some components aren’t versioned or have an unversioned version that’s co-located with actual versions.
version key is assigned
~, defining the component version as unversioned, Antora:
sorts the unversioned component version above other versions that belong to the same component
identifies it as the latest version of a component or, if the
prereleasekey is set, as the latest prerelease version of a component
assigns the fallback value
display_versionkey at runtime for display purposes in the UI menus, except when:
display_versionkey is assigned a value in antora.yml, or
the prerelease key is assigned an identifier and the
display_versionkey isn’t set in antora.yml; at runtime, Antora assigns the identifier to the
doesn’t add a version segment to the unversioned component version’s page and asset URLs, even if the latest_version_segment key or latest_prerelease_version_segment key is set in the playbook, unless the
UI and extension developers
When a component version is defined as unversioned:
Because an unversioned component version is often the only version or always the latest component version in a component, Antora automatically routes any incoming references that originate from other components that don’t specify a version coordinate to it.
However, in rare cases, such as when referencing an unversioned prerelease from another component version, you can use the reserved keyword
_ (an underscore) as the version coordinate in the page ID or resource ID (e.g.,
xref:_@component:module:file-name.adoc) to reference an unversioned component version.