Directory and File Names
Trail uses directory names to derive navigation and URLs. A source name
contains an order, a slug, and sometimes a kind suffix. trail-source(5)
is the authoritative naming and containment reference.
Read a source name #
In 200--getting-started.topic, 200 controls sibling order,
getting-started supplies the URL slug, and .topic selects the grouping
kind. Root collections use a slug and .product or .antho, without an
order.
Choose topics for independently readable pages and books for an ordered document with section numbers. Shelves group navigation without adding a URL segment. See Anatomy of a Site for a complete example tree.
Keep names stable #
Renaming a slug changes URLs and references. Order changes usually affect
navigation only; in books they also affect published section numbers.
Run trail build --strict after structural changes to find broken links.
Use link aliases when the same page belongs in several navigation locations. An alias does not duplicate the source article.
Reserved names #
Trail publishes generated pages and asset directories alongside authored
content. Some slugs are reserved to prevent collisions. trail-source(5)
lists them and the allowed files at each level of a tree.