From 24d64175fb7f9c0c4e148841abee69fd905a09e7 Mon Sep 17 00:00:00 2001 From: lethosor Date: Wed, 8 Jul 2020 02:13:37 -0400 Subject: [PATCH] Remove top-level links from TOCs --- conf.py | 3 ++- docs/Binpatches.rst | 3 ++- docs/Compile.rst | 5 +++-- docs/Contributing.rst | 4 ++-- docs/Core.rst | 5 +++-- docs/Documentation.rst | 4 ++-- docs/History.rst | 19 +++++++++++-------- docs/Introduction.rst | 3 ++- docs/Lua API.rst | 5 +++-- docs/Memory-research.rst | 4 ++-- docs/NEWS-dev.rst | 5 +++-- docs/NEWS.rst | 9 +++++---- docs/Plugins.rst | 5 +++-- docs/Scripts-removed.rst | 5 +++-- library/xml | 2 +- 15 files changed, 47 insertions(+), 34 deletions(-) diff --git a/conf.py b/conf.py index 1c5ef9853..aebe73bab 100644 --- a/conf.py +++ b/conf.py @@ -153,7 +153,8 @@ def write_script_docs(): for k in head: title = ('.. _scripts-{k}:\n\n{l}\n{t}\n{l}\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], l=len(head[k])*'#', a=('' if k == 'base' else k + '/') diff --git a/docs/Binpatches.rst b/docs/Binpatches.rst index 40ae8af32..b92190bc8 100644 --- a/docs/Binpatches.rst +++ b/docs/Binpatches.rst @@ -15,7 +15,8 @@ the `binpatch` command. at all possible - that way your work will work for many versions across multiple operating systems. -.. contents:: +.. contents:: Contents + :local: Getting a patch diff --git a/docs/Compile.rst b/docs/Compile.rst index c8c51e88c..26f720076 100644 --- a/docs/Compile.rst +++ b/docs/Compile.rst @@ -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 pay close attention if this is your first time compiling DFHack. -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 1 .. _compile-how-to-get-the-code: diff --git a/docs/Contributing.rst b/docs/Contributing.rst index 6231b6f04..28e4e6e95 100644 --- a/docs/Contributing.rst +++ b/docs/Contributing.rst @@ -2,8 +2,8 @@ How to contribute to DFHack ########################### -.. contents:: - +.. contents:: Contents + :local: .. _contributing-code: diff --git a/docs/Core.rst b/docs/Core.rst index 9cad075f4..8f84c7b54 100644 --- a/docs/Core.rst +++ b/docs/Core.rst @@ -4,8 +4,9 @@ DFHack Core ########### -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 2 Command Implementation diff --git a/docs/Documentation.rst b/docs/Documentation.rst index cbbf8e153..8a829c0a8 100644 --- a/docs/Documentation.rst +++ b/docs/Documentation.rst @@ -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. The main thing you lose in plain text format is hyperlinking.) -.. contents:: - +.. contents:: Contents + :local: .. _docs-standards: diff --git a/docs/History.rst b/docs/History.rst index 8386c4cab..d382b351e 100644 --- a/docs/History.rst +++ b/docs/History.rst @@ -1,16 +1,19 @@ :orphan: -.. _HISTORY: +.. _History: -######################## -HISTORY - old changelogs -######################## +##################### +Historical changelogs +##################### -This file is where old changelogs live, so the current `changelog` -in ``NEWS.rst`` doesn't get too long. +This file is where old changelogs live, so the `current changelog ` +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 ` to handle. -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 1 DFHack 0.43.05-r3 ================= diff --git a/docs/Introduction.rst b/docs/Introduction.rst index 52675d364..dc05c8725 100644 --- a/docs/Introduction.rst +++ b/docs/Introduction.rst @@ -30,7 +30,8 @@ allows easier development of new tools. As an open-source project under `various copyleft licences `, contributions are welcome. -.. contents:: +.. contents:: Contents + :local: .. _installing: diff --git a/docs/Lua API.rst b/docs/Lua API.rst index d7e94b92a..3e0f22116 100644 --- a/docs/Lua API.rst +++ b/docs/Lua API.rst @@ -24,8 +24,9 @@ implemented by Lua files located in :file:`hack/lua/*` (:file:`library/lua/*` in the git repo). -.. contents:: - :depth: 3 +.. contents:: Contents + :local: + :depth: 2 ========================= diff --git a/docs/Memory-research.rst b/docs/Memory-research.rst index 08c0c9573..41aa437c8 100644 --- a/docs/Memory-research.rst +++ b/docs/Memory-research.rst @@ -9,8 +9,8 @@ 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 IRC, Bay12, etc.). -.. contents:: - :local: +.. contents:: Contents + :local: Cross-platform tools diff --git a/docs/NEWS-dev.rst b/docs/NEWS-dev.rst index 7a9da7cb7..f0c47fe96 100644 --- a/docs/NEWS-dev.rst +++ b/docs/NEWS-dev.rst @@ -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. -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 1 .. include:: /docs/_auto/news-dev.rst diff --git a/docs/NEWS.rst b/docs/NEWS.rst index 22f9881b9..1283b079a 100644 --- a/docs/NEWS.rst +++ b/docs/NEWS.rst @@ -13,14 +13,15 @@ appeared. See `build-changelog` for more information. See `dev-changelog` for a list of changes grouped by development releases. -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 1 .. include:: /docs/_auto/news.rst 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. diff --git a/docs/Plugins.rst b/docs/Plugins.rst index 5c855ddd3..0bd699e14 100644 --- a/docs/Plugins.rst +++ b/docs/Plugins.rst @@ -9,8 +9,9 @@ game subsystems or the entire renderer. Most commands offered by plugins are listed here, hopefully organised in a way you will find useful. -.. contents:: - :depth: 3 +.. contents:: Contents + :local: + :depth: 2 =============================== Data inspection and visualizers diff --git a/docs/Scripts-removed.rst b/docs/Scripts-removed.rst index 4490110ba..5fa3d3ec4 100644 --- a/docs/Scripts-removed.rst +++ b/docs/Scripts-removed.rst @@ -4,8 +4,9 @@ Removed scripts The following scripts were removed for various reasons. -.. contents:: - :depth: 2 +.. contents:: Contents + :local: + :depth: 1 .. _warn-stuck-trees: diff --git a/library/xml b/library/xml index 2d67b03a1..847ec0c2d 160000 --- a/library/xml +++ b/library/xml @@ -1 +1 @@ -Subproject commit 2d67b03a1c5c701e65fb483b9d6c1d3067f990cb +Subproject commit 847ec0c2d4dc74a887e1f980eeed6f97345c195e