配置构建器

通过入口点发现构建器

Added in version 1.6.

可以通过入口点_来找到 builder 扩展名,因此不必在扩展名配置值中列出它们。

Builder extensions should define an entry point in the "sphinx.builders" group. The name of the entry point needs to match your builder’s name attribute, which is the name passed to the sphinx-build -b option. The entry point value should equal the dotted name of the extension module. Here is an example of how an entry point for ‘mybuilder’ can be defined in the extension’s pyproject.toml

[project.entry-points."sphinx.builders"]
mybuilder = "my.extension.module"

注意,仍然需要在扩展程序的:func:`setup`函数中使用~~ .Sphinx.add_builder`注册生成器。