Conditional toctree in Sphinx

后端 未结 4 1278
故里飘歌
故里飘歌 2020-12-30 12:31

I want to do multiple versions of a documentation, which differ in the sections that are included. To achieve this I would usually use either the only directive or the ifcon

4条回答
  •  清歌不尽
    2020-12-30 12:39

    A very simple solution is to maintain two separate index files under different names. You can specify which index file to use by default in conf.py and override it for a special build using -D master_doc=alternate-index on the sphinx-build command line.

提交回复
热议问题