Define a Component Version with No Version
Sometimes the project or process your 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 right now.
In these cases, you may prefer the component version’s page URLs not contain the version
value.
This is where the special value master
comes into play.
A repository branch named master and a version key with a value of master aren’t related.
A repository branch can be a content source specified in a playbook.
The value of the version key is part of the identity of a component version, and it’s defined in an antora.yml file.
|
Assign master as the version value
Antora requires the version key be assigned a value in antora.yml. This value becomes the version coordinate in the component version’s page and resource IDs.
The value of version
also becomes the version segment in the URL of its published pages.
For example, if the value is 2.1
, that value will appear in the URL of the component version’s pages (e.g., /component-name/2.1/page-name.html).
The exception to this rule is if version
matches the reserved value master
.
Antora does not include the version segment in a component version’s page URLs in this case.
For instance, the component version defined in Example 1 will produce versionless URLs.
name: tutorials
version: master
title: Tutorials
display_version: Stable
A page with the filename build-a-restful-web-service.adoc in this component version will have the URL /tutorials/build-a-restful-web-service.html.
Also, you can still reference this docs component from other docs components using a fully qualified page ID or resource ID (e.g., master@tutorials::build-a-restful-web-service.adoc
).