Docs project layout
A docs project is a folder, usually a whole Git repository, with
opend.config.yaml at its root. Copy templates/docs-starter
to start one.
Only opend.config.yaml and the root map it names are required. The rest is
convention, and the starter template follows it:
| Path | What it holds |
|---|---|
opend.config.yaml | Release, root map, publications, declared attribute values, build filter, theme and logo. See opend.config.yaml reference. |
maps/ | The site map, bookmaps for PDF publications, and submaps such as shared key definitions. |
topics/ | One topic file per page. The page URL is the file path without its extension, for example /topics/install.html. |
reuse/ | Reusable chunks pulled in with conref or conkeyref. Kept out of every map, so they are never published on their own. |
images/ | SVG, PNG, JPEG, GIF or WebP files that topics reference. |
filters/publish.ditaval | The build-time filter, for example to drop audience="internal" for everyone. |
theme/site.css | Brand colours and fonts for the site, the help panel and PDFs. |
preview-contexts.yaml | Sample readers for the previewer. See preview-contexts.yaml reference. |
help-contexts.yaml | Maps host-app routes to context-sensitive help keys. See help-contexts.yaml reference. |
.github/workflows/validate.yml | Validates every pull request. See Validate every pull request. |
What the build reads
- Files ending in
.dita,.ditamap,.bookmap,.ditaval,.xml,.yamland.ymlare read as text. Other files are only checked for existence until something references them. - Folders named
.git,node_modules,.opendanddistare ignored. .xmlfiles whose root is not a topic are left alone, so other XML can live in the project.- Paths in maps, references and the config must stay inside the docs root.