Codebase Layout
Allowed directories
The project has the following directory layout:
| Directory | Role |
|---|---|
the MrDocs library sources and its private headers |
|
the public headers of the MrDocs library |
|
self-contained libraries the library and the tests depend on |
|
the test suites, each its own executable (unit, golden, benchmarks, CMake package, plugin API) |
|
self-contained projects that show how to run MrDocs |
|
the Antora site, its extensions and its build scripts |
|
assets the project ships or feeds the build with, but does not compile |
|
user-facing tools built on MrDocs, and the CMake files it installs |
|
developer and CI tooling the project never ships |
|
This is a small variant of the Pitchfork layout. It only differs from it in that:
All other conventions of the Pitchfork layout apply, including the rules for |
Any tracked files and file git does not ignore at the top level should hold only the entries on this page. Each directory has its own page and constraints.
|
Guard
|
Allowed entries
The root holds these files and nothing else for tools that require them at a fixed path.
| File | Role |
|---|---|
|
the root build |
|
the shared CMake presets |
|
entry point of the dependency and build setup |
|
template of the installed CMake package config |
|
the license |
|
the project readme |
Tolerated entries
Hidden or generated entries that a tool owns and do not support anywhere else are also tolerated.
| Entry | Role |
|---|---|
|
workflows, the composite actions they share under |
|
the formatting rules |
|
line-ending and diff attributes |
|
ignored files |
Gitignored files and directories are also tolerated by the checks. For instance, a ./local directory is gitignored as a common place to put temporary local build artifacts, and the check does not fail on it.
Not allowed
Any top-level entry that the tables on this page do not list is forbidden, and the check fails on it. A few common examples that tempt people are:
| Entry | Correct destination |
|---|---|
|
Build helpers for the root build go in |
|
Contributor scripts go in one of the categories of |
|
Nowhere, because bootstrap fetches dependencies into |
|
User-facing tools go in |
Allowed root-level directories should not have README.md files explaining their contents as this belongs in this documentation. Short READMEs deeper in the tree stay when they document one tool or suite, but python3 -I utils/lint/lint.py fails a README you changed when it is over 180 words.