zdocs_conf
The shared Sphinx configuration every document’s conf.py shim calls into.
Source: sphinx/zdocs_conf.py.
Shared Sphinx configuration for zdocs documents.
Each document’s conf.py is a thin shim that calls configure(), passing
its own directory. This module is named zdocs_conf to not
conflict with a docset wide conf_common` the user might have on the path as well.
Environment contract (all set by add_sphinx_target):
ZDOCS_CONF_DIRWhere this file lives. zdocs is a separate repository, checked out wherever the Zephyr module system put it, so no relative path from a consumer’s tree can reach it. (A consumer’s
conf.pyis read from its authored directory, so relative paths to the consumer’s own files work fine.)ZDOCS_DOC_IDThe document’s registry key (its folder name).
ZDOCS_PROJECT_BASEThe consuming repository’s root — the git repo whose tags date the document.
ZDOCS_REGISTRYOptional path to
documents.yaml. Empty means a standalone document with no cross-references, which is a supported configuration, not a degraded one.ZDOCS_DOC_BUILD_DIR,ZDOCS_DOC_DEPLOY_DIR,ZDOCS_DOC_BASE_URLBuild tree, deploy tree, and the URL the deploy tree is served under.
- zdocs_conf.configure(namespace, doc_dir, project=None, author=None, copyright_holder=None, html_logo=None, extensions=None, static_path=None, css_files=None, templates_path=None, needs_config=None)[source]
Populate a document’s
conf.pyglobals with the shared configuration.doc_diris the document’s own directory.project,authorandcopyright_holderare the consumer’s identity.extensionsis appended to the engine’s list rather than replacing it, so a consumer can add its own without having to restate the two-stage build’s requirements (and without being able to drop them by accident).