Remove top-level links from TOCs

develop
lethosor 2020-07-08 02:13:37 -04:00
parent 85003a40c2
commit 24d64175fb
15 changed files with 47 additions and 34 deletions

@ -153,7 +153,8 @@ def write_script_docs():
for k in head: for k in head:
title = ('.. _scripts-{k}:\n\n{l}\n{t}\n{l}\n\n' title = ('.. _scripts-{k}:\n\n{l}\n{t}\n{l}\n\n'
'.. include:: /scripts/{a}about.txt\n\n' '.. include:: /scripts/{a}about.txt\n\n'
'.. contents::\n\n').format( '.. contents:: Contents\n'
' :local:\n\n').format(
k=k, t=head[k], k=k, t=head[k],
l=len(head[k])*'#', l=len(head[k])*'#',
a=('' if k == 'base' else k + '/') a=('' if k == 'base' else k + '/')

@ -15,7 +15,8 @@ the `binpatch` command.
at all possible - that way your work will work for many versions at all possible - that way your work will work for many versions
across multiple operating systems. across multiple operating systems.
.. contents:: .. contents:: Contents
:local:
Getting a patch Getting a patch

@ -13,8 +13,9 @@ DFHack from source, this document will walk you through the build process. Note
that some steps may be unconventional compared to other projects, so be sure to that some steps may be unconventional compared to other projects, so be sure to
pay close attention if this is your first time compiling DFHack. pay close attention if this is your first time compiling DFHack.
.. contents:: .. contents:: Contents
:depth: 2 :local:
:depth: 1
.. _compile-how-to-get-the-code: .. _compile-how-to-get-the-code:

@ -2,8 +2,8 @@
How to contribute to DFHack How to contribute to DFHack
########################### ###########################
.. contents:: .. contents:: Contents
:local:
.. _contributing-code: .. _contributing-code:

@ -4,7 +4,8 @@
DFHack Core DFHack Core
########### ###########
.. contents:: .. contents:: Contents
:local:
:depth: 2 :depth: 2

@ -25,8 +25,8 @@ compile the documentation in order to read it. Like Markdown, reST documents are
designed to be just as readable in a plain-text editor as they are in HTML format. designed to be just as readable in a plain-text editor as they are in HTML format.
The main thing you lose in plain text format is hyperlinking.) The main thing you lose in plain text format is hyperlinking.)
.. contents:: .. contents:: Contents
:local:
.. _docs-standards: .. _docs-standards:

@ -1,16 +1,19 @@
:orphan: :orphan:
.. _HISTORY: .. _History:
######################## #####################
HISTORY - old changelogs Historical changelogs
######################## #####################
This file is where old changelogs live, so the current `changelog` This file is where old changelogs live, so the `current changelog <changelog>`
in ``NEWS.rst`` doesn't get too long. doesn't get too long. Some of these changelogs are also formatted differently
from current changelogs and would be difficult for the current `changelog
generation system <build-changelog>` to handle.
.. contents:: .. contents:: Contents
:depth: 2 :local:
:depth: 1
DFHack 0.43.05-r3 DFHack 0.43.05-r3
================= =================

@ -30,7 +30,8 @@ allows easier development of new tools. As an open-source project under
`various copyleft licences <license>`, contributions are welcome. `various copyleft licences <license>`, contributions are welcome.
.. contents:: .. contents:: Contents
:local:
.. _installing: .. _installing:

@ -24,8 +24,9 @@ implemented by Lua files located in :file:`hack/lua/*`
(:file:`library/lua/*` in the git repo). (:file:`library/lua/*` in the git repo).
.. contents:: .. contents:: Contents
:depth: 3 :local:
:depth: 2
========================= =========================

@ -9,7 +9,7 @@ listed here. Note that some of these may be old and unmaintained. If you aren't
sure what tool would be best for your purposes, feel free to ask for advice (on sure what tool would be best for your purposes, feel free to ask for advice (on
IRC, Bay12, etc.). IRC, Bay12, etc.).
.. contents:: .. contents:: Contents
:local: :local:

@ -13,7 +13,8 @@ which they first appeared. See `build-changelog` for more information.
See `changelog` for a list of changes grouped by stable releases. See `changelog` for a list of changes grouped by stable releases.
.. contents:: .. contents:: Contents
:depth: 2 :local:
:depth: 1
.. include:: /docs/_auto/news-dev.rst .. include:: /docs/_auto/news-dev.rst

@ -13,14 +13,15 @@ appeared. See `build-changelog` for more information.
See `dev-changelog` for a list of changes grouped by development releases. See `dev-changelog` for a list of changes grouped by development releases.
.. contents:: .. contents:: Contents
:depth: 2 :local:
:depth: 1
.. include:: /docs/_auto/news.rst .. include:: /docs/_auto/news.rst
Older Changelogs Older Changelogs
================ ================
Are kept in a seperate file: `HISTORY` Are kept in a seperate file: `History`
.. that's ``docs/history.rst``, if you're reading the raw text. .. that's ``docs/History.rst``, if you're reading the raw text.

@ -9,8 +9,9 @@ game subsystems or the entire renderer.
Most commands offered by plugins are listed here, Most commands offered by plugins are listed here,
hopefully organised in a way you will find useful. hopefully organised in a way you will find useful.
.. contents:: .. contents:: Contents
:depth: 3 :local:
:depth: 2
=============================== ===============================
Data inspection and visualizers Data inspection and visualizers

@ -4,8 +4,9 @@ Removed scripts
The following scripts were removed for various reasons. The following scripts were removed for various reasons.
.. contents:: .. contents:: Contents
:depth: 2 :local:
:depth: 1
.. _warn-stuck-trees: .. _warn-stuck-trees:

@ -1 +1 @@
Subproject commit 2d67b03a1c5c701e65fb483b9d6c1d3067f990cb Subproject commit 847ec0c2d4dc74a887e1f980eeed6f97345c195e