From e40ba9c6c5d3253a9d44771b1ef54a9dc7fbe638 Mon Sep 17 00:00:00 2001
From: PLanCompS <18308236+pdmosses@users.noreply.github.com>
Date: Sat, 2 May 2020 14:39:31 +0200
Subject: [PATCH] Update documentation with collapsible TOC
Makes the TOC at the top of the page collapsible.
Adds an explanation of the markup used to produce a collapsible TOC.
Adds a comment about the possibility of using an unordered list for the TOC,
and about using TOC only once per page.
---
docs/navigation-structure.md | 26 ++++++++++++++++++++++----
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md
index a4fef75..04e34af 100644
--- a/docs/navigation-structure.md
+++ b/docs/navigation-structure.md
@@ -7,11 +7,14 @@ nav_order: 5
# Navigation Structure
{: .no_toc }
-## Table of contents
-{: .no_toc .text-delta }
-
+
+
+ Table of contents
+
+ {: .text-delta }
1. TOC
{:toc}
+
---
@@ -224,4 +227,19 @@ To generate a Table of Contents on your docs pages, you can use the `{:toc}` met
{:toc}
```
-This example skips the page name heading (`#`) from the TOC, as well as the heading for the Table of Contents itself (`##`) because it is redundant, followed by the table of contents itself.
+This example skips the page name heading (`#`) from the TOC, as well as the heading for the Table of Contents itself (`##`) because it is redundant, followed by the table of contents itself. To get an unordered list, replace `1. TOC` above by `- TOC`.
+
+The table of contents can be made collapsible by adding HTML markup, as in the following example. The attribute `open` and the styling with `{: .text-delta }` are optional.
+
+```markdown
+
+
+ Table of contents
+
+ {: .text-delta }
+1. TOC
+{:toc}
+
+```
+
+The result is shown at [the top of this page](#navigation-structure) (`{:toc}` can be used only once on each page).