Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我不确定这是否可能。但我希望将多个 .rst 文件放在一个目录中,并在编译期间。我希望这些文件自动插入到toctree. 我该怎么办?
toctree
您可以使用glob启用通配符的选项。像这样:
glob
.. toctree:: :glob: *
这会将同一目录中的所有其他 *.rst 文件添加到目录树。
参考:“在 toctree 指令中使用“通配符”