Sample Header Ad - 728x90

Sphinx: Generate one TOC per .rst

1 vote
1 answer
32 views
I am trying to convert GNU Parallel's (boring) POD-html to Sphinx. I use this index.rst: ~~~ .. SPDX-FileCopyrightText: 2021 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc. .. .. SPDX-License-Identifier: GPL-3.0-or-later .. GNU Parallel documentation master file, created by sphinx-quickstart on Sat Jan 23 14:06:27 2021. You can adapt this file completely to your liking, but it should at least contain the root toctree directive. Welcome to GNU Parallel's documentation! ======================================== .. toctree:: :maxdepth: 3 :caption: Contents: parallel sem env_parallel parset parsort parallel_design parallel_tutorial parallel_alternatives parcat niceload sql Indices and tables ================== * :ref:genindex * :ref:modindex * :ref:search ~~~ It generates amongst other files: https://www.gnu.org/software/parallel/parset.html The problem here is that I want the left sidebar to only include headings relevant to parset - not to all the other files (e.g. the top link under CONTENTS links to parallel.html) Or at the very least: Insert a header over each new file, so the user can see this links to another command. I assume I simply need to add some magic to index.rst to tell it only to base CONTENTS on the current file. (The .rst files are generated from POD using pod2rst - and yes there are a few formatting bugs, but I am not going to maintain the documentation in .rst-format).
Asked by Ole Tange (37348 rep)
Jul 12, 2021, 09:22 AM
Last activity: Jul 12, 2021, 09:56 AM