项目接口¶
- class sphinx.project.Project(srcdir: str | os.PathLike[str], source_suffix: Iterable[str])[源代码]¶
A project is the source code set of the Sphinx document(s).
- discover(exclude_paths: Iterable[str] = (), include_paths: Iterable[str] = ('**',)) set[str] [源代码]¶
在源目录中查找所有文档文件,并将它们放入:attr:docnames。
- doc2path(docname: str, absolute: bool) str [源代码]¶
返回文件名的文件名。
If absolute is True, return as an absolute path. Else, return as a relative path to the source directory.
- path2doc(filename: str | PathLike[str]) str | None [源代码]¶
Return the docname for the filename if the file is a document.
*文件名*应该是绝对的或相对于源目录的。
- source_suffix¶
source_suffix。同:confval:source_suffix。
- srcdir¶
源目录