Named Module Directory

What’s a named module directory?

Named module directories are optional module directories that are located in a modules directory. You can create as many named module directories as you need.

Example 1. Named module directories
šŸ“’ repository
  šŸ“‚ docs (1)
    šŸ“„ antora.yml (2)
    šŸ“‚ modules (3)
      šŸ“‚ a-named-module (4)
        šŸ“‚ pages (5)
          šŸ“„ a-source-file.adoc (6)
        šŸ“„ nav.adoc (7)
      šŸ“‚ get-started (8)
        šŸ“‚ pages
          šŸ“„ a-source-file.adoc
1 Content source root
2 Required antora.yml file
3 Required modules directory
4 A named module directory
5 pages family directory
6 A source file for a page
7 A navigation file
8 Another module directory, named get-started

Antora uses a module’s directory name to create a module’s name. For this reason, it’s important to carefully consider what you name your named module directories. At a minimum, a named module directory must contain at least one family directory with at least one source file. A named module directory can also contain an optional navigation file.

What’s a named module?

Source files in each named module directory become part of a named module in a component version. The name of a module corresponds to the name of a module directory. For instance, source files stored in the get-started module directory shown in Example 1 will be assigned to the module get-started.

Where’s a module’s name used?

When you target content that belongs to a named module from another module or component version, you’ll specify the module’s name in the page IDs of cross references and the resource IDs for images, examples, and partials.

The module’s name is also used as a segment in page URLs.