Configuration reference#
All configuration values are set in conf.py.
Extension setup#
extensions = ["sphinx_ford"]
FORD bridge options#
ford_project_filePath to a single FORD project file (usually a
.mdfile). When set, FORD parses the Fortran sources at build time.Default:
Noneford_project_filesList of FORD project files to load. Each entry can be a string path or a dict with per-project overrides:
ford_project_files = [ "path/to/project1/docs.md", { "path": "path/to/project2/DBCSR.md", "vars": {"CMAKE_SOURCE_DIR": "/path/to/project2"}, "preprocess": False, }, ]
Modules from all projects are merged into a single pool for
f:automodulelookup.Default:
[]ford_project_varsDictionary of
{VAR: value}for substituting@VAR@patterns in CMake-templated FORD project files. Applied to projects loaded viaford_project_file(per-project overrides use thevarskey inford_project_filesentries instead).Default:
{}Example:
ford_project_vars = { "CMAKE_SOURCE_DIR": "/path/to/project", "dbcsr_VERSION": "2.9.1", }
ford_preprocessWhether to run the Fortran preprocessor on files with
fpp_extensions. WhenTrue(default), sphinx-ford detects the preprocessor command from the FORD project file and verifies it is available. If the preprocessor is not found, an error is raised with installation instructions. Set toFalseto skip preprocessing entirely.Default:
Trueford_displayDefault visibility filter for
f:automoduleandf:autoprojectdirectives. A list of permission levels to include, e.g.["public"]or["public", "protected"]. Entities whosepermissionis not in the set are hidden. Falls back to the FORD project’s owndisplaysetting when not set.Can be overridden per-directive with the
:visibility:option.Default:
None(use FORD project setting)Example:
ford_display = ["public", "protected"]
ford_caseNormalize Fortran keyword case in auto-generated documentation. Controls how type names, attributes (
pointer,allocatable), intent qualifiers, and procedure prefixes (pure,elemental) are displayed."lower"lowercase all keywords
"upper"uppercase all keywords
Nonepreserve original case from source
Can be overridden per-directive with the
:case:option.Default:
NoneExample:
ford_case = "lower"
ford_export_modules_jsonIf
True, write a FORD-compatiblemodules.jsonto the output directory after building. This enables FORD projects to link back to sphinx-ford docs.Default:
False