代码之家  ›  专栏  ›  技术社区  ›  kirikoumath

自动toctree更新

  •  5
  • kirikoumath  · 技术社区  · 11 年前

    我不确定这是否可能。但我希望在编译过程中将多个.rst文件放在一个目录中。我希望这些文件自动插入 toctree 我该怎么办?

    1 回复  |  直到 6 年前
        1
  •  7
  •   bad_coder Singh    5 年前

    您可以使用 glob 启用通配符的选项。这样地:

    .. toctree::
       :glob:
    
       *
    

    这会将同一目录中的所有其他*.rst文件添加到toctree中。

    参考: "Use “globbing” in toctree directives"