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/8] 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/8] 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/8] 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
From 1bdd849d863214900b089d841223f17518ffc951 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Tue, 30 Jun 2020 13:58:26 -0400 Subject: [PATCH 4/8] Update navigation-structure.md --- docs/navigation-structure.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index 7283c32..d5a7504 100644 --- a/docs/navigation-structure.md +++ b/docs/navigation-structure.md @@ -7,14 +7,11 @@ nav_order: 5 # Navigation Structure {: .no_toc } -
- - Table of contents - - {: .text-delta } +## Table of contents +{: .no_toc .text-delta } + 1. TOC {:toc} -
--- From 5a96a218b337b7eaf4fe6421b81e7f9fb4a4c483 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Tue, 30 Jun 2020 20:07:25 +0200 Subject: [PATCH 5/8] Fixed css .search-active.main --- _sass/search.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_sass/search.scss b/_sass/search.scss index 8a7f410..eb94cb7 100644 --- a/_sass/search.scss +++ b/_sass/search.scss @@ -308,6 +308,8 @@ @include mq(md) { .main { position: fixed; + right: 0; + left: 0; } } From bf31b8b9a0d59c2556973d554ca23fe6cb6a25df Mon Sep 17 00:00:00 2001 From: Mike Coutermarsh Date: Sat, 4 Jul 2020 14:28:52 -0700 Subject: [PATCH 6/8] Improve accessibility by adding label to Anchor links. I ran Lighthouse on just-the-docs and noticed the anchor links were missing a "discernible name". This adds aria-labelledby to the header element to improve these for screenreaders. --- _includes/vendor/anchor_headings.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/vendor/anchor_headings.html b/_includes/vendor/anchor_headings.html index 25397df..985f448 100755 --- a/_includes/vendor/anchor_headings.html +++ b/_includes/vendor/anchor_headings.html @@ -64,7 +64,7 @@ {% capture anchor %}{% endcapture %} {% if html_id and headerLevel >= minHeader and headerLevel <= maxHeader %} - {% capture anchor %}href="#{{ html_id}}"{% endcapture %} + {% capture anchor %}href="#{{ html_id}}" aria-labelledby="{{ html_id}}"{% endcapture %} {% if include.anchorClass %} {% capture anchor %}{{ anchor }} class="{{ include.anchorClass }}"{% endcapture %} @@ -97,4 +97,4 @@ {% endcapture %} {% capture edited_headings %}{{ edited_headings }}{{ new_heading }}{% endcapture %} {% endfor %} -{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }} \ No newline at end of file +{% endcapture %}{% assign headingsWorkspace = '' %}{{ edited_headings | strip }} From 9edd8d5c502965f113fe01ef6b4c4fa177ade275 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Wed, 15 Jul 2020 17:56:09 -0400 Subject: [PATCH 7/8] Bump version to 0.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index afcd98a..49fd3df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "just-the-docs", - "version": "0.3.0", + "version": "0.3.1", "description": "A modern Jekyll theme for documentation", "repository": "pmarsceill/just-the-docs", "license": "MIT", From 46aa1134a84b18805ab60009045d3b6ef46a9bc1 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Wed, 15 Jul 2020 17:56:37 -0400 Subject: [PATCH 8/8] Update just-the-docs.gemspec --- just-the-docs.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/just-the-docs.gemspec b/just-the-docs.gemspec index 58fd834..c41ddaa 100644 --- a/just-the-docs.gemspec +++ b/just-the-docs.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "just-the-docs" - spec.version = "0.3.0" + spec.version = "0.3.1" spec.authors = ["Patrick Marsceill"] spec.email = ["patrick.marsceill@gmail.com"]