From 399646f6a0963053787498bf756ae8f0c584a351 Mon Sep 17 00:00:00 2001 From: Alexandre Gramfort Date: Mon, 14 Dec 2020 10:00:07 +0100 Subject: [PATCH] add TOC in sidebar to doc pages (#655) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add TOC in sidebar to doc pages * Remove TOCs (we now have sidebar TOCs) Co-authored-by: Richard Höchenberger --- doc/api.rst | 4 ---- doc/conf.py | 1 + doc/install.rst | 4 ---- doc/sphinxext/gen_cli.py | 4 ---- doc/use.rst | 4 ---- doc/whats_new.rst | 4 ---- doc/whats_new_previous_releases.rst | 7 ------- examples/read_bids_datasets.py | 4 ---- examples/update_bids_datasets.py | 4 ---- 9 files changed, 1 insertion(+), 35 deletions(-) diff --git a/doc/api.rst b/doc/api.rst index f9ffb7d16..762775a9a 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -6,10 +6,6 @@ API Documentation ================= -.. contents:: Contents - :local: - :depth: 2 - mne_bids -------- :py:mod:`mne_bids`: diff --git a/doc/conf.py b/doc/conf.py index b97b38e0e..02a55faed 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -116,6 +116,7 @@ ("Contribute!", "contribute") ]} +html_sidebars = {'**': ['localtoc.html']} # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = { diff --git a/doc/install.rst b/doc/install.rst index 25c0dc3e5..1f336ea03 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -3,10 +3,6 @@ Installation ============ -.. contents:: Contents - :local: - :depth: 2 - Dependencies ------------ diff --git a/doc/sphinxext/gen_cli.py b/doc/sphinxext/gen_cli.py index eeccd01c7..d06f73e1e 100644 --- a/doc/sphinxext/gen_cli.py +++ b/doc/sphinxext/gen_cli.py @@ -39,10 +39,6 @@ def setup(app): Here we list the MNE-BIDS tools that you can use from the command line. -.. contents:: Contents - :local: - :depth: 1 - """ command_rst = """ diff --git a/doc/use.rst b/doc/use.rst index 0fc7d9cc3..51434dd83 100644 --- a/doc/use.rst +++ b/doc/use.rst @@ -3,10 +3,6 @@ Using MNE-BIDS ============== -.. contents:: Contents - :local: - :depth: 1 - Quickstart ---------- diff --git a/doc/whats_new.rst b/doc/whats_new.rst index 4e59e2999..90d5274a0 100644 --- a/doc/whats_new.rst +++ b/doc/whats_new.rst @@ -14,10 +14,6 @@ Version 0.6 (unreleased) ------------------------ xxx -.. contents:: Contents - :local: - :depth: 3 - Notable changes ~~~~~~~~~~~~~~~ xxx diff --git a/doc/whats_new_previous_releases.rst b/doc/whats_new_previous_releases.rst index 0a48ee667..802b13049 100644 --- a/doc/whats_new_previous_releases.rst +++ b/doc/whats_new_previous_releases.rst @@ -7,10 +7,6 @@ What was new in previous releases? ================================== -.. contents:: Contents - :local: - :depth: 3 - .. currentmodule:: mne_bids .. _changes_0_5: @@ -21,9 +17,6 @@ This is a **big** release with lots of changes, many of them breaking existing code. But do not fear: migration is easy, and you will **love** what we have been cooking for you! -.. contents:: Contents - :local: - :depth: 3 Notable changes ~~~~~~~~~~~~~~~ diff --git a/examples/read_bids_datasets.py b/examples/read_bids_datasets.py index 57c0466be..b83e5d11b 100644 --- a/examples/read_bids_datasets.py +++ b/examples/read_bids_datasets.py @@ -23,10 +23,6 @@ # License: BSD (3-clause) ############################################################################### -# .. contents:: Contents -# :local: -# :depth: 1 -# # Imports # ------- # We are importing everything we need for this example: diff --git a/examples/update_bids_datasets.py b/examples/update_bids_datasets.py index a88e845ba..07f7b3cb2 100644 --- a/examples/update_bids_datasets.py +++ b/examples/update_bids_datasets.py @@ -16,10 +16,6 @@ # License: BSD (3-clause) ############################################################################### -# .. contents:: Contents -# :local: -# :depth: 1 -# # Imports # ------- # We are importing everything we need for this example: