All configuration lives in a JSON file that we'll call
conf.json. Every path is relative to the directory in which this file lives.
Note: JSON cannot contain comments, so this isn't copy-pasteable.
Defining table of contents structure with
file_hierarchy option, in addition to collecting input files, determines the structure of the table of contents, and therefore the order in which the resulting documents are navigated.
The wording in this section might not be great. If something is confusing, please open a ticket.
Each entry in
file_hierarchy can be one of:
string: a relative path to a file (such as
"index.md") or a glob (such as `"*.md")
list: a list of strings specifying paths to be sorted together. For example, given files
b.md, the list
["*.txt", "*.md"]would be expanded by Computer Words to
["a.txt", "b.md", "c.txt"].
dict: should have exactly one key, a file path. The value is a list of these data types.
When you use a list and/or glob, multiple files often match. The order in which these files appear is based on two things:
If two files are in the same directory and one file is called
"index.*", it will come before the other file.
Otherwise, sorting is alphabetical.
Example 1: All files in a single directory
You can use a single flat glob to collect every file in a directory.
Example 2: All files in a directory and its subdirectories
Note: this will not create subsections based on directories. Each document's headings will be at the top level.
Example 3: Explicit ordering with nesting