From 57354abb2032b4598ce513d5d1ca788fe3bcf356 Mon Sep 17 00:00:00 2001
From: Paul Beesley <paul.beesley@arm.com>
Date: Thu, 7 Mar 2019 17:03:22 +0000
Subject: [PATCH] doc: Remove per-page contents lists

These are no longer needed as there will always be a table of contents
rendered to the left of every page.

Some of these lists can be quite long and, when opening a page, the
reader sees nothing but a huge list of contents! After this patch,
the document contents are front-and-centre and the contents are
nicely rendered in the sidebar without duplication.

Change-Id: I444754d548ec91d00f2b04e861de8dde8856aa62
Signed-off-by: Paul Beesley <paul.beesley@arm.com>
---
 docs/change-log.rst                                   | 2 --
 docs/components/exception-handling.rst                | 3 ---
 docs/components/firmware-update.rst                   | 4 ----
 docs/components/platform-interrupt-controller-API.rst | 2 --
 docs/components/ras.rst                               | 3 ---
 docs/components/romlib-design.rst                     | 2 --
 docs/components/sdei.rst                              | 3 ---
 docs/components/secure-partition-manager-design.rst   | 2 --
 docs/components/xlat-tables-lib-v2-design.rst         | 3 ---
 docs/design/auth-framework.rst                        | 2 --
 docs/design/cpu-specific-build-macros.rst             | 5 -----
 docs/design/firmware-design.rst                       | 2 --
 docs/design/interrupt-framework-design.rst            | 2 --
 docs/design/psci-pd-tree.rst                          | 4 ----
 docs/design/reset-design.rst                          | 5 -----
 docs/design/trusted-board-boot.rst                    | 5 -----
 docs/getting_started/image-terminology.rst            | 2 --
 docs/getting_started/porting-guide.rst                | 2 --
 docs/getting_started/psci-lib-integration-guide.rst   | 4 ----
 docs/getting_started/rt-svc-writers-guide.rst         | 4 ----
 docs/getting_started/user-guide.rst                   | 2 --
 docs/index.rst                                        | 5 ++++-
 docs/plat/rpi3.rst                                    | 2 --
 docs/process/coding-guidelines.rst                    | 2 --
 docs/process/platform-compatibility-policy.rst        | 7 -------
 docs/process/release-information.rst                  | 4 ----
 26 files changed, 4 insertions(+), 79 deletions(-)

diff --git a/docs/change-log.rst b/docs/change-log.rst
index 76ec07082..1b6a481f9 100644
--- a/docs/change-log.rst
+++ b/docs/change-log.rst
@@ -4,8 +4,6 @@ Change Log & Release Notes
 This document contains a summary of the new features, changes, fixes and known
 issues in each release of Trusted Firmware-A.
 
-.. contents::
-
 Version 2.1
 -----------
 
diff --git a/docs/components/exception-handling.rst b/docs/components/exception-handling.rst
index b370c02fd..2452e06a5 100644
--- a/docs/components/exception-handling.rst
+++ b/docs/components/exception-handling.rst
@@ -1,9 +1,6 @@
 Exception Handling Framework
 ============================
 
-.. contents::
-    :depth: 2
-
 .. |EHF| replace:: Exception Handling Framework
 .. |TF-A| replace:: Trusted Firmware-A
 
diff --git a/docs/components/firmware-update.rst b/docs/components/firmware-update.rst
index 8124097a9..608803d57 100644
--- a/docs/components/firmware-update.rst
+++ b/docs/components/firmware-update.rst
@@ -1,10 +1,6 @@
 Firmware Update (FWU)
 =====================
 
-.. contents::
-
---------------
-
 Introduction
 ------------
 
diff --git a/docs/components/platform-interrupt-controller-API.rst b/docs/components/platform-interrupt-controller-API.rst
index 5c2293f09..7890cd38f 100644
--- a/docs/components/platform-interrupt-controller-API.rst
+++ b/docs/components/platform-interrupt-controller-API.rst
@@ -1,8 +1,6 @@
 Platform Interrupt Controller API
 =================================
 
-.. contents::
-
 This document lists the optional platform interrupt controller API that
 abstracts the runtime configuration and control of interrupt controller from the
 generic code. The mandatory APIs are described in the `porting guide`__.
diff --git a/docs/components/ras.rst b/docs/components/ras.rst
index 4c16009c4..9d56e63a5 100644
--- a/docs/components/ras.rst
+++ b/docs/components/ras.rst
@@ -1,9 +1,6 @@
 Reliability, Availability, and Serviceability (RAS) Extensions
 ==============================================================
 
-.. contents::
-    :depth: 2
-
 .. |EHF| replace:: Exception Handling Framework
 .. |TF-A| replace:: Trusted Firmware-A
 
diff --git a/docs/components/romlib-design.rst b/docs/components/romlib-design.rst
index 00dbf67c8..9f62b7c45 100644
--- a/docs/components/romlib-design.rst
+++ b/docs/components/romlib-design.rst
@@ -1,8 +1,6 @@
 Library at ROM
 ==============
 
-.. contents::
-
 This document provides an overview of the "library at ROM" implementation in
 Trusted Firmware-A (TF-A).
 
diff --git a/docs/components/sdei.rst b/docs/components/sdei.rst
index aca1ccb06..8c0878976 100644
--- a/docs/components/sdei.rst
+++ b/docs/components/sdei.rst
@@ -1,9 +1,6 @@
 SDEI: Software Delegated Exception Interface
 ============================================
 
-.. contents::
-    :depth: 2
-
 This document provides an overview of the SDEI dispatcher implementation in
 Trusted Firmware-A (TF-A).
 
diff --git a/docs/components/secure-partition-manager-design.rst b/docs/components/secure-partition-manager-design.rst
index 91a135b98..31276cd76 100644
--- a/docs/components/secure-partition-manager-design.rst
+++ b/docs/components/secure-partition-manager-design.rst
@@ -1,8 +1,6 @@
 Secure Partition Manager
 ************************
 
-.. contents::
-
 Background
 ==========
 
diff --git a/docs/components/xlat-tables-lib-v2-design.rst b/docs/components/xlat-tables-lib-v2-design.rst
index 26e4f2b9b..a78d35116 100644
--- a/docs/components/xlat-tables-lib-v2-design.rst
+++ b/docs/components/xlat-tables-lib-v2-design.rst
@@ -1,9 +1,6 @@
 Translation (XLAT) Tables Library
 =================================
 
-.. contents::
-
-
 This document describes the design of the translation tables library (version 2)
 used by Trusted Firmware-A (TF-A). This library provides APIs to create page
 tables based on a description of the memory layout, as well as setting up system
diff --git a/docs/design/auth-framework.rst b/docs/design/auth-framework.rst
index dc45127f8..49f0def5e 100644
--- a/docs/design/auth-framework.rst
+++ b/docs/design/auth-framework.rst
@@ -1,8 +1,6 @@
 Authentication Framework & Chain of Trust
 =========================================
 
-.. contents::
-
 The aim of this document is to describe the authentication framework
 implemented in Trusted Firmware-A (TF-A). This framework fulfills the
 following requirements:
diff --git a/docs/design/cpu-specific-build-macros.rst b/docs/design/cpu-specific-build-macros.rst
index d099ebe26..e49c73e7b 100644
--- a/docs/design/cpu-specific-build-macros.rst
+++ b/docs/design/cpu-specific-build-macros.rst
@@ -1,11 +1,6 @@
 Arm CPU Specific Build Macros
 =============================
 
-
-
-
-.. contents::
-
 This document describes the various build options present in the CPU specific
 operations framework to enable errata workarounds and to enable optimizations
 for a specific CPU on a platform.
diff --git a/docs/design/firmware-design.rst b/docs/design/firmware-design.rst
index d6d7b1530..27d09480a 100644
--- a/docs/design/firmware-design.rst
+++ b/docs/design/firmware-design.rst
@@ -1,8 +1,6 @@
 Firmware Design
 ===============
 
-.. contents::
-
 Trusted Firmware-A (TF-A) implements a subset of the Trusted Board Boot
 Requirements (TBBR) Platform Design Document (PDD) [1]_ for Arm reference
 platforms. The TBB sequence starts when the platform is powered on and runs up
diff --git a/docs/design/interrupt-framework-design.rst b/docs/design/interrupt-framework-design.rst
index 2a641b128..6f692b2f1 100644
--- a/docs/design/interrupt-framework-design.rst
+++ b/docs/design/interrupt-framework-design.rst
@@ -1,8 +1,6 @@
 Interrupt Management Framework 
 ==============================
 
-.. contents::
-
 This framework is responsible for managing interrupts routed to EL3. It also
 allows EL3 software to configure the interrupt routing behavior. Its main
 objective is to implement the following two requirements.
diff --git a/docs/design/psci-pd-tree.rst b/docs/design/psci-pd-tree.rst
index 23c985b6e..e52da77c6 100644
--- a/docs/design/psci-pd-tree.rst
+++ b/docs/design/psci-pd-tree.rst
@@ -1,10 +1,6 @@
 PSCI Power Domain Tree Structure
 ================================
 
-.. contents::
-
---------------
-
 Requirements
 ------------
 
diff --git a/docs/design/reset-design.rst b/docs/design/reset-design.rst
index 405b4920d..c38f62748 100644
--- a/docs/design/reset-design.rst
+++ b/docs/design/reset-design.rst
@@ -1,11 +1,6 @@
 CPU Reset
 =========
 
-
-
-
-.. contents::
-
 This document describes the high-level design of the framework to handle CPU
 resets in Trusted Firmware-A (TF-A). It also describes how the platform
 integrator can tailor this code to the system configuration to some extent,
diff --git a/docs/design/trusted-board-boot.rst b/docs/design/trusted-board-boot.rst
index 76badb623..dbe2f2aa4 100644
--- a/docs/design/trusted-board-boot.rst
+++ b/docs/design/trusted-board-boot.rst
@@ -1,11 +1,6 @@
 Trusted Board Boot
 ==================
 
-
-
-
-.. contents::
-
 The Trusted Board Boot (TBB) feature prevents malicious firmware from running on
 the platform by authenticating all firmware images up to and including the
 normal world bootloader. It does this by establishing a Chain of Trust using
diff --git a/docs/getting_started/image-terminology.rst b/docs/getting_started/image-terminology.rst
index 10aebf5e4..d9e08f76c 100644
--- a/docs/getting_started/image-terminology.rst
+++ b/docs/getting_started/image-terminology.rst
@@ -1,8 +1,6 @@
 Image Terminology
 =================
 
-.. contents::
-
 This page contains the current name, abbreviated name and purpose of the various
 images referred to in the Trusted Firmware project.
 
diff --git a/docs/getting_started/porting-guide.rst b/docs/getting_started/porting-guide.rst
index f07284333..458615ec3 100644
--- a/docs/getting_started/porting-guide.rst
+++ b/docs/getting_started/porting-guide.rst
@@ -1,8 +1,6 @@
 Porting Guide
 =============
 
-.. contents::
-
 Introduction
 ------------
 
diff --git a/docs/getting_started/psci-lib-integration-guide.rst b/docs/getting_started/psci-lib-integration-guide.rst
index c8cf3f393..f5ea0d78b 100644
--- a/docs/getting_started/psci-lib-integration-guide.rst
+++ b/docs/getting_started/psci-lib-integration-guide.rst
@@ -1,10 +1,6 @@
 PSCI Library Integration guide for Armv8-A AArch32 systems
 ==========================================================
 
-
-
-.. contents::
-
 This document describes the PSCI library interface with a focus on how to
 integrate with a suitable Trusted OS for an Armv8-A AArch32 system. The PSCI
 Library implements the PSCI Standard as described in `PSCI spec`_ and is meant
diff --git a/docs/getting_started/rt-svc-writers-guide.rst b/docs/getting_started/rt-svc-writers-guide.rst
index 35948b547..559d701a3 100644
--- a/docs/getting_started/rt-svc-writers-guide.rst
+++ b/docs/getting_started/rt-svc-writers-guide.rst
@@ -1,10 +1,6 @@
 EL3 Runtime Service Writer's Guide
 =====================================================
 
-
-
-.. contents::
-
 Introduction
 ------------
 
diff --git a/docs/getting_started/user-guide.rst b/docs/getting_started/user-guide.rst
index 894313a7f..a4aa1a791 100644
--- a/docs/getting_started/user-guide.rst
+++ b/docs/getting_started/user-guide.rst
@@ -1,8 +1,6 @@
 User Guide
 ==========
 
-.. contents::
-
 This document describes how to build Trusted Firmware-A (TF-A) and run it with a
 tested set of other software components using defined configurations on the Juno
 Arm development platform and Arm Fixed Virtual Platform (FVP) models. It is
diff --git a/docs/index.rst b/docs/index.rst
index b0348f165..f23b948d0 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -3,7 +3,7 @@ Trusted Firmware-A Documentation
 
 .. toctree::
    :maxdepth: 1
-   :caption: Contents
+   :hidden:
 
    Home<self>
    getting_started/index
@@ -18,6 +18,9 @@ Trusted Firmware-A Documentation
    maintainers
    license
 
+.. contents:: On This Page
+    :depth: 3
+
 Trusted Firmware-A (TF-A) provides a reference implementation of secure world
 software for `Armv7-A and Armv8-A`_, including a `Secure Monitor`_ executing
 at Exception Level 3 (EL3). It implements various Arm interface standards,
diff --git a/docs/plat/rpi3.rst b/docs/plat/rpi3.rst
index f8b59b52f..d155fcbfb 100644
--- a/docs/plat/rpi3.rst
+++ b/docs/plat/rpi3.rst
@@ -1,8 +1,6 @@
 Raspberry Pi 3
 ==============
 
-.. contents::
-
 The `Raspberry Pi 3`_ is an inexpensive single-board computer that contains four
 Arm Cortex-A53 cores.
 
diff --git a/docs/process/coding-guidelines.rst b/docs/process/coding-guidelines.rst
index def5bf991..856882b5f 100644
--- a/docs/process/coding-guidelines.rst
+++ b/docs/process/coding-guidelines.rst
@@ -1,8 +1,6 @@
 Coding Style & Guidelines
 =========================
 
-.. contents::
-
 The following sections contain TF coding guidelines. They are continually
 evolving and should not be considered "set in stone". Feel free to question them
 and provide feedback.
diff --git a/docs/process/platform-compatibility-policy.rst b/docs/process/platform-compatibility-policy.rst
index 47b0e7e96..1c80eb562 100644
--- a/docs/process/platform-compatibility-policy.rst
+++ b/docs/process/platform-compatibility-policy.rst
@@ -1,13 +1,6 @@
 Platform Compatibility Policy
 =============================
 
-
-
-
-.. contents::
-
---------------
-
 Introduction
 ------------
 
diff --git a/docs/process/release-information.rst b/docs/process/release-information.rst
index 89c19ab2a..b81d42d59 100644
--- a/docs/process/release-information.rst
+++ b/docs/process/release-information.rst
@@ -1,10 +1,6 @@
 Release Processes
 =================
 
-.. contents::
-
---------------
-
 Project Release Cadence
 -----------------------
 
-- 
GitLab