Assign Navigation Files to a Component Version

On this page, you’ll learn:

  • How to register navigation files with the nav key in antora.yml.

  • How registration order affects the component version’s page menu.

The nav key is optional. It’s set in a component version’s antora.yml file and accepts a list of navigation files. Each value specifies the path to a navigation file (e.g., modules/module-directory/nav-file.adoc) from antora.yml.

Example 1. antora.yml that registers two navigation files
name: colorado
title: Colorado ∆
version: '5.6'
nav: (1)
- modules/get-started/nav.adoc (2)
- modules/ROOT/nav.adoc (3)
1 The nav key must be entered on its own line and be directly followed by a colon (:).
2 Value registering a navigation file located in the get-started module directory.
3 Value registering a navigation file located in the ROOT module directory.

Each value listed under nav must be structured as follows:

  • Don’t indent the values.

  • Enter each value on its own line.

  • Start each value with a hyphen (-), followed by a blank space.

  • After the blank space, enter the path to an individual navigation file relative to the location of the antora.yml file.

A navigation file is registered when it’s assigned to the nav key. Only the contents of registered navigation files are assembled into and published as the component version’s page menu. The order of the values dictates the order the contents of the navigation files are displayed in the component version’s page menu on your site.