Project API¶
- class sphinx.project.Project(srcdir: str, source_suffix: dict[str, str])[source]¶
A project is the source code set of the Sphinx document(s).
-
discover(exclude_paths: list[str] =
[]) set[str][source]¶ Find all document files in the source directory and put them in
docnames.
-
doc2path(docname: str, basedir: bool =
True) str[source]¶ Return the filename for the document name.
If basedir is True, return as an absolute path. Else, return as a relative path to the source directory.
- path2doc(filename: str) str | None[source]¶
Return the docname for the filename if the file is a document.
filename should be absolute or relative to the source directory.
- source_suffix¶
source_suffix. Same as
source_suffix.
- srcdir¶
Source directory.
-
discover(exclude_paths: list[str] =