From bf031eb68b7dd356751b4763c49c8b6c92d01c35 Mon Sep 17 00:00:00 2001 From: PLanCompS <18308236+pdmosses@users.noreply.github.com> Date: Sat, 2 May 2020 11:24:49 +0200 Subject: [PATCH 1/3] Update .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b447a12..a802a86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.gem .bundle +.jekyll-cache .sass-cache _site Gemfile.lock 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 2/3] 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). From 845261205f764a4c4907acbc62084733b6ceef56 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Tue, 30 Jun 2020 13:03:17 -0400 Subject: [PATCH 3/3] Make cursor pointer, update docs, and add heading --- _sass/content.scss | 4 ++++ docs/navigation-structure.md | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/_sass/content.scss b/_sass/content.scss index 7ab23d8..764392e 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -165,6 +165,10 @@ } } + summary { + cursor: pointer; + } + h1, h2, h3, diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index 0e09660..7283c32 100644 --- a/docs/navigation-structure.md +++ b/docs/navigation-structure.md @@ -236,7 +236,9 @@ To generate a Table of Contents on your docs pages, you can use the `{:toc}` met 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. +### Collapsible Table of Contents + +The Table of Contents can be made collapsible using the `
` and `` elements , as in the following example. The attribute `open` (expands the Table of Contents by default) and the styling with `{: .text-delta }` are optional. ```markdown