Recommendations for Module Directory Names
When you’re creating module directories, you need to consider how your team will use the files stored in them and how their names will affect your site’s URLs.
Antora assigns the name of a module from the name of a module folder. A module name is used as the module coordinate in the resource IDs of pages, images, attachments, examples, and partials. It’s also used in the URLs of the publishable resources assigned to that module (except for the ROOT module).
When choosing a module folder name, keep the following requirements and recommendations in mind:
Named module directories can’t contain blank spaces or forward slashes (
/). These characters aren’t permitted in the targets of AsciiDoc cross references, image macros, or include directives.
If possible, don’t use uppercase letters, underscores (
_), and other characters that aren’t recommended in URLs. Such characters can limit web server portability, downgrade site search results, and cause visitor accessibility problems.
If your team often references resources across modules, they’ll have to type a module’s name in the resource IDs, so don’t make the folder name, and hence the module name, too long or hard to remember. Good module names are short and descriptive.
Example 1 shows a set of standard directories with three named module directories.
📒 repository 📂 docs 📄 antora.yml 📂 modules 📂 gear (1) 📂 images 📄 image-source-file.ext 📂 la-garita (2) 📂 pages 📄 page-source-file.adoc 📂 ROOT (3) 📂 pages 📄 page-source-file.adoc 📄 nav.adoc 📂 sdk (4) 📂 examples 📄 example-source-file.ext 📂 pages 📄 page-source-file.adoc 📄 nav.adoc
|1||Module directory named gear|
|2||Module directory named la-garita|
|3||ROOT module directory|
|4||Module directory named sdk|
Antora will calculate the following module names from the named module directories in Example 1: