网页 综合 更新时间 2026-11-14 09:32:49

Extensions — Sphinx documentation

自动蜘蛛 www.sphinx-doc.org 正文约 1365 字
Since many projects will need special features in their documentation, Sphinx allows adding “extensions” to the build process, each of which can modify almost any aspect of document processing.
This chapter describes the extensions bundled with Sphinx. For the API documentation on writing your own extension, refer to Sphinx API.
These extensions are built in and can be activated by respective entries in the extensions configuration value:
You can find several extensions contributed by users in the sphinx-contrib organization. If you wish to include your extension in this organization, simply follow the instructions provided in the github-administration project. This is optional and there are several extensions hosted elsewhere. The awesome-sphinxdoc and sphinx-extensions projects are both curated lists of Sphinx packages, and many packages use the Framework :: Sphinx :: Extension and Framework :: Sphinx :: Theme trove classifiers for Sphinx extensions and themes, respectively.
Extensions local to a project should be put within the project’s directory structure. Set Python’s module search path, sys.path, accordingly so that Sphinx can find them. For example, if your extension foo.py lies in the exts subdirectory of the project root, put into conf.py:
You can also install extensions anywhere else on sys.path, e.g. in the site-packages directory.
访问原文 返回搜索 https://www.sphinx-doc.org/en/master/usage/extensions/index.html
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。