重组文本TOC子组

问题描述 投票:0回答:1

我正在尝试使用指向不同rst文件的子组来获取TOC。这是我的index.rst:

.. bonobo-trans documentation master file, created by
   sphinx-quickstart on Fri Feb  8 18:09:07 2019.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

.. toctree::
   :maxdepth: 2

Transformations
---------------

- :doc:`source/source`
- :doc:`source/target`
- :doc:`source/lookup`
- :doc:`source/sequencer`
- :doc:`source/sorter`
- :doc:`source/aggregator`

Source
``````
Target
``````
Lookup
``````

Requirements
------------
- bonobo 0.6.3
- pandas
- sqlalchemy

Installation
------------

Install bonobo-trans by running:

    pip install bonobo-trans

Contribute
----------

- Issue Tracker: github.com/$project/$project/issues
- Source Code: github.com/$project/$project

Support
-------

If you are having issues, please let me know.

License
-------

The project is licensed under the Apache license.

我添加了三个小标题来说明我需要它看起来如何,但我只想要一个“转换”部分下的链接列表。基本上这是它应该如何结束:

example

这可能吗??

python-sphinx restructuredtext read-the-docs
1个回答
0
投票

这是一个让你更接近的选择是使用:hidden:选项toctree。但是,您不会在同一页面上获得可折叠部分或对标题的引用。

Transformations
---------------

.. toctree::
   :maxdepth: 1
   :includehidden:

   sequencer
   sorter
   aggregator

.. toctree::
   :hidden:

   source
   target
   lookup

Requirements
------------
- bonobo 0.6.3
- pandas
- sqlalchemy

Installation
------------
...

另请注意,文件只是在TOC中通过其名称引用,因此无需使用:doc:。假设所有文档引用都包含在source目录中,前提是它在conf.py中配置。

© www.soinside.com 2019 - 2024. All rights reserved.