Register Navigation Files
nav key is set in a component version descriptor file (antora.yml).
It accepts a list of navigation files as values.
Each value specifies the path to an individual navigation file.
If you aren’t familiar with how to set the
nav key and assign it values, review Assign Navigation Files to a Component Version.
When a navigation file is assigned to the
nav key, this file is registered.
Only the contents of registered navigation files are assembled into, and published as, a component version page menu.
In Example 1, two navigation files have been registered.
name: component-b title: Component B version: '1.0' nav: - modules/ROOT/nav.adoc (1) - modules/module-one/nav.adoc (2)
|1||Value registering a navigation file located in the ROOT directory.|
|2||Value registering a navigation file located in the module-one directory|
The navigation lists in the two registered files will be published into a single component version page menu for Component B 1.0.
The order of the
nav key’s values dictates the order the contents of the registered navigation files are assembled in the published component version page menu.
In Example 1, the contents of the ROOT module’s navigation file will be at the top of the component version page menu and the contents of Module One’s navigation file will be appended to the end of the ROOT navigation list.