just-the-docs 0.4.0.rc1 → 0.4.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aa28801ecd375b6f33c05fe2a01d6c1d2c9349e8f492fe4333ed1ec31e88e29
4
- data.tar.gz: 364fbb35634041dc11794946c9ece4dbfadce4d856611c9cd91098753015c4eb
3
+ metadata.gz: 276a9876ab7ea255d059f3fab034b1c5a2b761ebb41226b3c40dda1a308498f6
4
+ data.tar.gz: 52d3b15c3642ee6b8c50e05c1560f5b578415a6b662fa5ad7de3cfb77113bf21
5
5
  SHA512:
6
- metadata.gz: 2e553b4e9136153159ff4a91864ad1e5ec4aa99cfa45a882e5c881ae45e21f3cd957872118c6e7dc8fd37b9a66828ca2837f10dd744f9dbffcdf378a1e9e66c0
7
- data.tar.gz: 1c924c9add4ebc1e2471b27126524918906067f25d3afecc5bbe8ae1d1307ee3a921906540f7a1c4a34fb159614b9c9ba602cee9ddbdaaa17124a71c50d1c6a7
6
+ metadata.gz: 2a9a998bc8fa70292b635307e4074efee09f88e2505914e3dec306123bcdc490bcc8cdce8c690cbf4aa7fb32abf294653525b5d421eb94ebd9c3d8c92ef70257
7
+ data.tar.gz: 0d1b18248f05366af1ce1b5bbb5a6a8d1f93dff2813483a3e4c246a787bea4037e9f3466fb6552934d779bb2eec51b0da3bb93bc8d8760d0b5d70c551c9d52ed
data/CHANGELOG.md CHANGED
@@ -1,29 +1,95 @@
1
- # Changelog
1
+ # CHANGELOG
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
- *Note:* the project underwent a maintenance shift in the creation of v0.4.0.
5
+ *Note:* The project underwent a major maintenance shift in March 2022.
6
6
 
7
- ## v0.4.0.rc1
7
+ ## HEAD
8
+
9
+ *Note:* This website is built from the `HEAD` of the `main` branch of the theme repository. It includes docs for the following changes, which are *not* in the latest pre-release!
10
+
11
+ ## Pre-release v0.4.0.rc2
12
+
13
+ Hey there! This is likely the last pre-release before releasing `v0.4.0`, which we plan on doing soon (i.e. before the end of the month) - very exciting! Some new additions to highlight:
14
+
15
+ - significant improvement on build time of navigation panel by @pdmosses
16
+ - this is big: for a community member with over 300 pages, we shortened the build time from 3 minutes to 30 seconds!
17
+ - improved accessibility features led by @JPrevost
18
+ - more docs!
19
+
20
+ The intention of this release candidate is to gather even more feedback on a potential `v0.4.0`. As it stands, we have not encountered any breaking changes with early adopters of `v0.4.0.rc1`. If you encounter any - for either of our prereleases - please let us know!
21
+
22
+ ### Trying out pre-release `v0.4.0.rc2`
23
+
24
+ Simlar to the prior release, `v0.4.0.rc2` is a **release candidate** for the theme (i.e., a pre-release) with release `v0.4.0` coming soon. We want your help in testing the changes! As of now, the gem on RubyGems and the repository are updated to `v0.4.0.rc2` - if your version of Just the Docs is not pinned, you'll see the changes the next time you run `bundle install` (if you don't have a `Gemfile.lock`) or `bundle update just-the-docs` (if you do).
25
+
26
+ To use this RC explicitly as a remote theme:
27
+
28
+ ```yml
29
+ remote_theme: just-the-docs/just-the-docs@v0.4.0.rc2
30
+ ```
31
+
32
+ To use this RC explicitly as a gem-based theme, pin the version in your `Gemfile` and re-run `bundle install` or `bundle update just-the-docs`:
33
+
34
+ ```Ruby
35
+ gem "just-the-docs", "0.4.0.rc2"
36
+ ```
37
+
38
+ By default, **users will not be upgraded to `0.4.0.rc2`**. To enforce that explicitly, either:
39
+
40
+ 1. pin your gem version in your `Gemfile`, like so
41
+ ```Ruby
42
+ gem "just-the-docs", "0.3.3"
43
+ ```
44
+ 2. freeze the `remote_theme`, like so
45
+ ```yml
46
+ remote_theme: just-the-docs/just-the-docs@v0.3.3
47
+ ```
48
+
49
+ ### Features
50
+
51
+ - Added: accessible titles to nested page nav toggle by @JPrevost in https://github.com/just-the-docs/just-the-docs/pull/950
52
+ - Added: better title styling for AsciiDoc examples by @alyssais in https://github.com/just-the-docs/just-the-docs/pull/944
53
+ - Added: docs for custom search placeholder by @mattxwang in https://github.com/just-the-docs/just-the-docs/pull/939
54
+ - Added: provide ability to skip to main content by @JPrevost in https://github.com/just-the-docs/just-the-docs/pull/949
55
+ - Fixed: exclude `vendor/` in Jekyll config by @manuelhenke in https://github.com/just-the-docs/just-the-docs/pull/941
56
+ - Fixed: improve build time of navigation panel by @pdmosses in https://github.com/just-the-docs/just-the-docs/pull/956
57
+
58
+ ### Documentation and Maintenance
59
+
60
+ - Added: docs load mermaid.js by default by @mattxwang in https://github.com/just-the-docs/just-the-docs/pull/935
61
+ - Fixed: table of contents on search docs by @robinpokorny in https://github.com/just-the-docs/just-the-docs/pull/940
62
+ - Fixed: broken docs link (custom footer) by @olgarithms in https://github.com/just-the-docs/just-the-docs/pull/951
63
+ - Fixed: clarify version docs by @pdmosses in https://github.com/just-the-docs/just-the-docs/pull/955
64
+ - Deleted: unused script directory by @mattxwang in https://github.com/just-the-docs/just-the-docs/pull/937
65
+
66
+ ### New Contributors
67
+
68
+ * @robinpokorny made their first contribution in https://github.com/just-the-docs/just-the-docs/pull/940
69
+ * @olgarithms made their first contribution in https://github.com/just-the-docs/just-the-docs/pull/951
70
+ * @manuelhenke made their first contribution in https://github.com/just-the-docs/just-the-docs/pull/941
71
+ * @JPrevost made their first contribution in https://github.com/just-the-docs/just-the-docs/pull/950
72
+
73
+ ## Pre-release v0.4.0.rc1
8
74
 
9
75
  ### We're back!
10
76
 
11
- Hi all! The Just the Docs team is excited to have our first release in over two years! This release is jam-packed with features and bugfixes that have been requested by the community since 2020. They include:
77
+ Hi all! The Just the Docs team is excited to have our first pre-release in over two years! It is jam-packed with features and bugfixes that have been requested by the community since 2020. They include:
12
78
 
13
79
  - The new callouts component
14
80
  - Allowing pages and collections to coexist on the navigation pane
15
81
  - New styling: dark syntax highlighting, support for jekyll-asciidoc, word-wrapping instead of overflow for various elements
16
82
  - More customization: external nav links, custom nav footers, favicon includes, search color and placeholder configuration, mermaid.js support, and nav sorting
17
83
  - Over 20 bugfixes! Big ones include fixing the `rake` command, using `relative_url`, and search input color
18
- - More documentation, especially on using custom includes.
84
+ - More documentation, especially on using custom includes
19
85
  - Updating core dependencies to stable Ruby versions
20
86
  - A WIP [template repository](https://github.com/just-the-docs/just-the-docs-template) that allows you to setup your own repository using Just the Docs and GitHub Pages with one click - give it a shot! More documentation, etc. is on the way!
21
87
 
22
88
  We want your feedback! Are these changes helpful? Are our docs easy to understand? Should new features like `mermaid` be opt-in or opt-out? Please [open an issue](https://github.com/just-the-docs/just-the-docs/issues) or [start a discussion](https://github.com/just-the-docs/just-the-docs/discussions) and let us know!
23
89
 
24
- ### Trying out `v0.4.0.rc1`
90
+ ### Trying out pre-release `v0.4.0.rc1`
25
91
 
26
- Due to the massive scope of these changes, we're releasing `v0.4.0.rc1` as a **release candidate** for the theme, with `v0.4.0` coming soon. We want your help in testing the theme! As of now, the gem on RubyGems and the repository are updated to `v0.4.0.rc1` - if your version of Just the Docs is not pinned, you'll see the changes the next time you build / run `bundle install` (if you don't use a `Gemfile.lock`) or `bundle update just-the-docs` (if you do).
92
+ Due to the massive scope of these changes, we're making `v0.4.0.rc1` avaialble as a **release candidate** for the theme (i.e., a pre-release) with release `v0.4.0` coming soon. We want your help in testing the changes! As of now, the gem on RubyGems and the repository are updated to `v0.4.0.rc1` - if your version of Just the Docs is not pinned, you'll see the changes the next time you run `bundle install` (if you don't have a `Gemfile.lock`) or `bundle update just-the-docs` (if you do).
27
93
 
28
94
  To use this RC explicitly as a remote theme:
29
95
 
@@ -31,7 +97,7 @@ To use this RC explicitly as a remote theme:
31
97
  remote_theme: just-the-docs/just-the-docs@v0.4.0.rc1
32
98
  ```
33
99
 
34
- To use this RC explicitly as a gem-based theme, pin the version in your `Gemfile` and re-run `bundle install`:
100
+ To use this RC explicitly as a gem-based theme, pin the version in your `Gemfile` and re-run `bundle install` or `bundle update just-the-docs`:
35
101
 
36
102
  ```Ruby
37
103
  gem "just-the-docs", "0.4.0.rc1"
@@ -62,11 +128,12 @@ The new core team currently consists of @mattxwang, @pdmosses, @skullface, @doug
62
128
 
63
129
  ### Roadmap
64
130
 
65
- In the short-term, we're committed to tidying up everything for a `v0.4.0` release. This involves fixing bugs reported from the community in this release, as well as continually merging in minor PRs.
131
+ In the short-term, we're committed to tidying up everything for a `v0.4.0` release. This involves fixing bugs reported from the community in this pre-release, as well as continually merging in minor PRs.
66
132
 
67
133
  We're also scoping out medium and long-term projects, and want to keep you in the loop. These include:
68
134
 
69
135
  - upgrading to Jekyll 4, and stopping support for Jekyll 3
136
+ - versioned docs - issue [#728](https://github.com/just-the-docs/just-the-docs/issues/728)
70
137
  - improved accessibility - issues [#566](https://github.com/just-the-docs/just-the-docs/issues/566), [#870](https://github.com/just-the-docs/just-the-docs/issues/870)
71
138
  - internationalization (i18n) - issue [#59](https://github.com/just-the-docs/just-the-docs/issues/59)
72
139
  - recursive/multi-level navigation - PR [#462](https://github.com/just-the-docs/just-the-docs/pull/462)
@@ -267,18 +334,18 @@ as well as DX improvements like better regression tests, CI, and tooling. If you
267
334
 
268
335
  ### Bug fixes
269
336
  - Horizontal Alignment #103 @pmarsceill
270
- - Code snippet in headers do not inherit font size #140 @pmarsceill
337
+ - Code snippet in headers do not inherit font size #140 @pmarsceill
271
338
  - Fix duplicated title and description tags #294 @iefserge
272
339
  - Update nav.html for handling nav_exclude #282 @blawqchain
273
340
  - Fix duplicate entries in nav.html and default.html #239 @KasparEtter
274
- - Don't show pages with no title (e.g. redirects in nav) https://github.com/pmarsceill/just-the-docs/pull/295/commits/672de29f2e332a9350af7237e4fb6693c848989e @SgtSilvio
341
+ - Don't show pages with no title (e.g. redirects in nav) https://github.com/pmarsceill/just-the-docs/pull/295/commits/672de29f2e332a9350af7237e4fb6693c848989e @SgtSilvio
275
342
  - [SEARCH RAKE] Fix search generator #319 @RoiArthurB
276
343
 
277
344
  ### Enhancements
278
- - Improvement/custom themes #186 @SgtSilvio
345
+ - Improvement/custom themes #186 @SgtSilvio
279
346
  - feat: adds "edit this page" and "page last modified" to footer #217 @malsf21
280
347
  - feat: adds option to open aux links in new tab #229 @malsf21
281
- - Default nav order #236 @pdmosses
348
+ - Default nav order #236 @pdmosses
282
349
  - Enable IP anonymization in Google Analytics (GDPR) #250 @r-brown
283
350
 
284
351
  closes #240 #308 #266 #140 #103
@@ -301,7 +368,7 @@ closes #240 #308 #266 #140 #103
301
368
  - Update CI to test multiple versions of Jekyll
302
369
  - Update CI to check the rake command that builds the search file
303
370
 
304
- fixes #291 #256 #293 #177
371
+ fixes #291 #256 #293 #177
305
372
 
306
373
  ## v0.2.7
307
374
 
@@ -322,42 +389,42 @@ fixes #291 #256 #293 #177
322
389
  - Update docs to suggest using index.md as section page filename
323
390
  - Bump @primer/css from 12.6.0 to 12.7.0
324
391
  - Bump mixin-deep from 1.3.1 to 1.3.2
325
- - Bump stylelint-config-primer from 7.0.1 to 8.0.0
392
+ - Bump stylelint-config-primer from 7.0.1 to 8.0.0
326
393
 
327
394
  ### PR included
328
395
  - #98 by @stefanoborini Introduces the possibility for a summary in the table of contents
329
396
  - #141 by @ghabs Fix trailing comma bug in search-data.json
330
- - #153 by @jacobherrington Change button copy on theme preview
397
+ - #153 by @jacobherrington Change button copy on theme preview
331
398
  - #181 by @m3nu Recommend using index.md as parent page for sections
332
- - #183 by @SgtSilvio Improve heading anchors
399
+ - #183 by @SgtSilvio Improve heading anchors
333
400
  - #187 by @SgtSilvio Improvement/site logo
334
401
  - #200 Bump mixin-deep from 1.3.1 to 1.3.2
335
402
  - #203 by @pdmosses Search config
336
- - #205 by @pdmosses Fix blank_lines var to blanklines in config.yml
403
+ - #205 by @pdmosses Fix blank_lines var to blanklines in config.yml
337
404
  - #206 by @iamcarrico Allow for custom overrides by the user
338
405
  - #208 Bump @primer/css from 12.6.0 to 12.7.0
339
406
  - #213 Bump mixin-deep from 1.3.1 to 1.3.2
340
- - #214 Bump stylelint-config-primer from 7.0.1 to 8.0.0
407
+ - #214 Bump stylelint-config-primer from 7.0.1 to 8.0.0
341
408
  - #215 Bump @primer/css from 12.6.0 to 12.7.0
342
409
 
343
410
  ## v0.2.6
344
411
 
345
412
  ### Bugs fixed
346
- - Google Analytics tag has been updated #162
413
+ - Google Analytics tag has been updated #162
347
414
  - ~BaseURL has been modified #109~ Reverted -- seems the existing implementation worked
348
- - Titles can now wrap fixes #106
415
+ - Titles can now wrap fixes #106
349
416
 
350
417
  ### Enhancements
351
418
  - Search now displays content preview #135
352
- - Custom footer content added #179
419
+ - Custom footer content added #179
353
420
  - Now using GitHub Actions for CI #170
354
421
 
355
422
  ### Maintenance
356
- - lunrjs upgraded #135
357
- - Nav generation is optimized #159
358
- - Stylelint upgrade #143
359
- - Stylelint config primer upgrade #149
360
- - Lodash upgrade #160
423
+ - lunrjs upgraded #135
424
+ - Nav generation is optimized #159
425
+ - Stylelint upgrade #143
426
+ - Stylelint config primer upgrade #149
427
+ - Lodash upgrade #160
361
428
 
362
429
  ### PR included
363
430
  ~#109 by @daviddarnes - Fix baseurl link~ Reverted
@@ -371,7 +438,7 @@ fixes #291 #256 #293 #177
371
438
 
372
439
  ### Bugs fixed
373
440
 
374
- - Duplicate title tag when Jekyll SEO Plugin gem is used #125 #126
441
+ - Duplicate title tag when Jekyll SEO Plugin gem is used #125 #126
375
442
 
376
443
  ### Enhancements
377
444
 
@@ -379,7 +446,7 @@ fixes #291 #256 #293 #177
379
446
 
380
447
  ### Maintenance
381
448
  - Bump stylelint-config-primer from 6.0.0 to 7.0.0 #123
382
- - Bump @primer/css from 12.2.3 to 12.3.1 #129
449
+ - Bump @primer/css from 12.2.3 to 12.3.1 #129
383
450
  - Add workflow to publish to GPR
384
451
  - Fix workflow to publish to Ruby Gems
385
452
 
@@ -388,7 +455,7 @@ fixes #291 #256 #293 #177
388
455
  ### Bugs
389
456
 
390
457
  - #102 Remove unnecessary console.log() @JoeNyland
391
- - #97 Import custom Sass variable overrides before default variables are defined @montchr and @ptvandi
458
+ - #97 Import custom Sass variable overrides before default variables are defined @montchr and @ptvandi
392
459
 
393
460
  ### Additions
394
461
  - #117 Add links to docs for setting up GH pages locally @gnarea
@@ -397,14 +464,14 @@ fixes #291 #256 #293 #177
397
464
  ## v0.2.3
398
465
 
399
466
  ### Enhancements
400
- - Adds ability to use Google Analytics tracking by @pmarsceill
467
+ - Adds ability to use Google Analytics tracking by @pmarsceill
401
468
 
402
469
  ### Bug fixes
403
470
  - Fixes 404 error for "/assets/js//search-data.json" by @stephenedmondson
404
471
  - Fixes #80 Single quotes in the string were unescaped and ruby attempted variable substitution of amp within it (which failed) by @novelistparty
405
- - Fixes bug that would only show 2 or more search results (not one) by @ilivewithian
406
- - Fixes a typo on the layout example by @woernfl
407
- - Fixes #78 Page scroll position too far down on load by @pmarsceill
472
+ - Fixes bug that would only show 2 or more search results (not one) by @ilivewithian
473
+ - Fixes a typo on the layout example by @woernfl
474
+ - Fixes #78 Page scroll position too far down on load by @pmarsceill
408
475
  - Fixds ability to nest ul in ol without breaking style or counters
409
476
 
410
477
  ### Dependency updates
@@ -412,16 +479,16 @@ fixes #291 #256 #293 #177
412
479
 
413
480
  ## v0.2.2
414
481
 
415
- - Bumps stylelint-config-primer to 3.0.1 #44
416
- - Bumps bundler req to 2.0.1 #61
482
+ - Bumps stylelint-config-primer to 3.0.1 #44
483
+ - Bumps bundler req to 2.0.1 #61
417
484
  - Adds custom 404 page
418
- - Excludes package-lock.json from jekyll build #47
419
- - Fixes keyboard scrolling / focus #48
485
+ - Excludes package-lock.json from jekyll build #47
486
+ - Fixes keyboard scrolling / focus #48
420
487
  - Adds ARIA roles to navigation elements
421
488
  - Adds support for optional page description metadata (if present in yaml front matter)
422
- - Addresses some issues with search in #46
423
- - Option to hide TOC on parent pages if turned off in page's YAML front matter #30
424
- - Option to suppress an item from being indexed by search if present in page's YAML front matter #32
489
+ - Addresses some issues with search in #46
490
+ - Option to hide TOC on parent pages if turned off in page's YAML front matter #30
491
+ - Option to suppress an item from being indexed by search if present in page's YAML front matter #32
425
492
 
426
493
  ## v0.2.1
427
494
 
@@ -432,7 +499,7 @@ This update fixes security vulnerablities in the lodash sub-dependency and bumps
432
499
  Adds:
433
500
  - Dark mode via `color_scheme` parameter
434
501
  - Ability to exclude a page from the main nav with `nav_exclude` parameter closes #21
435
- - Ability for create children of children pages (3 nav levels) closes #25
502
+ - Ability for create children of children pages (3 nav levels) closes #25
436
503
 
437
504
  Changes:
438
505
  - Permalink structure for tiered navigation has been updated
@@ -442,14 +509,14 @@ Changes:
442
509
 
443
510
  ### Added
444
511
 
445
- - Support for task list styles #19
512
+ - Support for task list styles #19
446
513
  - Configuration docs
447
514
  - Configuration option to enable / disable search
448
515
  - Normalize.scss dependency pulled into project #16 #
449
516
 
450
517
  ### Fixed
451
518
 
452
- - Layout bug in navigation #17
519
+ - Layout bug in navigation #17
453
520
 
454
521
  ## v0.1.5
455
522
 
data/_includes/nav.html CHANGED
@@ -1,95 +1,117 @@
1
- <ul class="nav-list">
2
- {%- assign titled_pages = include.pages
3
- | where_exp:"item", "item.title != nil" -%}
1
+ {%- comment -%}
2
+ Pages with no `title` are implicitly excluded from the navigation.
3
+
4
+ The values of `title` and `nav_order` can be numbers or strings.
5
+ Jekyll gives build failures when sorting on mixtures of different types,
6
+ so numbers and strings need to be sorted separately.
4
7
 
5
- {%- comment -%}
6
- The values of `title` and `nav_order` can be numbers or strings.
7
- Jekyll gives build failures when sorting on mixtures of different types,
8
- so numbers and strings need to be sorted separately.
8
+ Here, numbers are sorted by their values, and come before all strings.
9
+ An omitted `nav_order` value is equivalent to the page's `title` value
10
+ (except that a numerical `title` value is treated as a string).
9
11
 
10
- Here, numbers are sorted by their values, and come before all strings.
11
- An omitted `nav_order` value is equivalent to the page's `title` value
12
- (except that a numerical `title` value is treated as a string).
12
+ The case-sensitivity of string sorting is determined by `site.nav_sort`.
13
+ {%- endcomment -%}
13
14
 
14
- The case-sensitivity of string sorting is determined by `site.nav_sort`.
15
- {%- endcomment -%}
16
-
17
- {%- assign string_ordered_pages = titled_pages
18
- | where_exp:"item", "item.nav_order == nil" -%}
19
- {%- assign nav_ordered_pages = titled_pages
20
- | where_exp:"item", "item.nav_order != nil" -%}
21
-
22
- {%- comment -%}
23
- The nav_ordered_pages have to be added to number_ordered_pages and
24
- string_ordered_pages, depending on the nav_order value.
25
- The first character of the jsonify result is `"` only for strings.
26
- {%- endcomment -%}
27
- {%- assign nav_ordered_groups = nav_ordered_pages
28
- | group_by_exp:"item", "item.nav_order | jsonify | slice: 0" -%}
29
- {%- assign number_ordered_pages = "" | split:"X" -%}
30
- {%- for group in nav_ordered_groups -%}
31
- {%- if group.name == '"' -%}
32
- {%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%}
33
- {%- else -%}
34
- {%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%}
35
- {%- endif -%}
36
- {%- endfor -%}
37
-
38
- {%- assign sorted_number_ordered_pages = number_ordered_pages | sort:"nav_order" -%}
15
+ {%- assign titled_pages = include.pages
16
+ | where_exp: "item", "item.title != nil" -%}
17
+
18
+ {%- assign string_ordered_pages = titled_pages
19
+ | where_exp: "item", "item.nav_order == nil" -%}
20
+ {%- assign nav_ordered_pages = titled_pages
21
+ | where_exp: "item", "item.nav_order != nil" -%}
22
+
23
+ {%- comment -%}
24
+ Add the nav-ordered pages to the number-ordered pages or the string-ordered pages,
25
+ depending on their `nav_order` value.
39
26
 
40
- {%- comment -%}
41
- The string_ordered_pages have to be sorted by nav_order, and otherwise title
42
- (where appending the empty string to a numeric title converts it to a string).
43
- After grouping them by those values, the groups are sorted, then the items
44
- of each group are concatenated.
45
- {%- endcomment -%}
46
- {%- assign string_ordered_groups = string_ordered_pages
47
- | group_by_exp:"item", "item.nav_order | default: item.title | append:''" -%}
48
- {%- if site.nav_sort == 'case_insensitive' -%}
49
- {%- assign sorted_string_ordered_groups = string_ordered_groups | sort_natural:"name" -%}
27
+ The first character of the `jsonify` result is `"` only for strings.
28
+ {%- endcomment -%}
29
+
30
+ {%- assign nav_ordered_groups = nav_ordered_pages
31
+ | group_by_exp: "item", "item.nav_order | jsonify | slice: 0" -%}
32
+
33
+ {%- assign number_ordered_pages = "" | split: "" -%}
34
+ {%- for group in nav_ordered_groups -%}
35
+ {%- if group.name == '"' -%}
36
+ {%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%}
50
37
  {%- else -%}
51
- {%- assign sorted_string_ordered_groups = string_ordered_groups | sort:"name" -%}
38
+ {%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%}
52
39
  {%- endif -%}
53
- {%- assign sorted_string_ordered_pages = "" | split:"X" -%}
54
- {%- for group in sorted_string_ordered_groups -%}
55
- {%- assign sorted_string_ordered_pages = sorted_string_ordered_pages | concat: group.items -%}
56
- {%- endfor -%}
40
+ {%- endfor -%}
41
+
42
+ {%- assign sorted_number_ordered_groups = number_ordered_pages
43
+ | sort: "nav_order" | group_by: "nav_order" -%}
57
44
 
58
- {%- assign pages_list = sorted_number_ordered_pages | concat: sorted_string_ordered_pages -%}
45
+ {%- comment -%}
46
+ Group the string-ordered pages by `nav_order`, if non-nil, and otherwise `title`
47
+ (but appending the empty string to a numeric title to convert it to a string).
59
48
 
60
- {%- for node in pages_list -%}
49
+ Then sort the groups according to the site setting for case (in)sensitivity.
50
+ {%- endcomment -%}
51
+
52
+ {%- assign string_ordered_groups = string_ordered_pages
53
+ | group_by_exp:"item", "item.nav_order | default: item.title | append: '' " -%}
54
+
55
+ {%- if site.nav_sort == 'case_insensitive' -%}
56
+ {%- assign sorted_string_ordered_groups = string_ordered_groups
57
+ | sort_natural: "name" -%}
58
+ {%- else -%}
59
+ {%- assign sorted_string_ordered_groups = string_ordered_groups
60
+ | sort:"name" -%}
61
+ {%- endif -%}
62
+
63
+ {%- assign groups_list = sorted_number_ordered_groups
64
+ | concat: sorted_string_ordered_groups -%}
65
+
66
+ <ul class="nav-list">
67
+ {%- for node_group in groups_list -%}
68
+ {%- for node in node_group.items -%}
61
69
  {%- if node.parent == nil -%}
62
70
  {%- unless node.nav_exclude -%}
63
71
  <li class="nav-list-item{% if page.collection == include.key and page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
64
72
  {%- if node.has_children -%}
65
- <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
73
+ <a href="#" class="nav-list-expander" aria-label="toggle links in {{ node.title }} category">
74
+ <svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg>
75
+ </a>
66
76
  {%- endif -%}
67
77
  <a href="{{ node.url | relative_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
68
78
  {%- if node.has_children -%}
79
+ {%- assign children_list = "" | split: "" -%}
80
+ {%- for parent_group in groups_list -%}
81
+ {%- assign children_list = children_list
82
+ | concat: parent_group.items
83
+ | where: "parent", node.title
84
+ | where_exp:"item", "item.grand_parent == nil" -%}
85
+ {%- endfor -%}
69
86
  {%- if node.child_nav_order == 'desc' -%}
70
- {%- assign children_list = pages_list | where: "parent", node.title | where_exp:"item", "item.grand_parent == nil" | reverse -%}
71
- {%- else -%}
72
- {%- assign children_list = pages_list | where: "parent", node.title | where_exp:"item", "item.grand_parent == nil" -%}
87
+ {%- assign children_list = children_list | reverse -%}
73
88
  {%- endif -%}
74
89
  <ul class="nav-list ">
75
90
  {%- for child in children_list -%}
76
91
  {%- unless child.nav_exclude -%}
77
92
  <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
78
93
  {%- if child.has_children -%}
79
- <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a>
94
+ <a href="#" class="nav-list-expander" aria-label="toggle links in {{ child.title }} category">
95
+ <svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg>
96
+ </a>
80
97
  {%- endif -%}
81
98
  <a href="{{ child.url | relative_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
82
99
  {%- if child.has_children -%}
100
+ {%- assign grandchildren_list = "" | split: "" -%}
101
+ {%- for grandparent_group in groups_list -%}
102
+ {%- assign grandchildren_list = grandchildren_list
103
+ | concat: grandparent_group.items
104
+ | where: "parent", child.title
105
+ | where: "grand_parent", node.title -%}
106
+ {%- endfor -%}
83
107
  {%- if node.child_nav_order == 'desc' -%}
84
- {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title | reverse -%}
85
- {%- else -%}
86
- {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
108
+ {%- assign grandchildren_list = grandchildren_list | reverse -%}
87
109
  {%- endif -%}
88
110
  <ul class="nav-list">
89
- {%- for grand_child in grand_children_list -%}
90
- {%- unless grand_child.nav_exclude -%}
91
- <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}">
92
- <a href="{{ grand_child.url | relative_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
111
+ {%- for grandchild in grandchildren_list -%}
112
+ {%- unless grandchild.nav_exclude -%}
113
+ <li class="nav-list-item {% if page.url == grandchild.url %} active{% endif %}">
114
+ <a href="{{ grandchild.url | relative_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grandchild.title }}</a>
93
115
  </li>
94
116
  {%- endunless -%}
95
117
  {%- endfor -%}
@@ -104,6 +126,7 @@
104
126
  {%- endunless -%}
105
127
  {%- endif -%}
106
128
  {%- endfor -%}
129
+ {%- endfor -%}
107
130
  {%- assign nav_external_links = site.nav_external_links -%}
108
131
  {%- for node in nav_external_links -%}
109
132
  <li class="nav-list-item external">
@@ -117,16 +140,28 @@
117
140
 
118
141
  {%- if page.collection == include.key -%}
119
142
 
120
- {%- for node in pages_list -%}
143
+ {%- for node_group in groups_list -%}
144
+ {%- for node in node_group.items -%}
121
145
  {%- if node.parent == nil -%}
122
- {%- if page.grand_parent == node.title or page.parent == node.title and page.grand_parent == nil -%}
146
+ {%- if page.grand_parent == node.title
147
+ or page.parent == node.title
148
+ and page.grand_parent == nil -%}
123
149
  {%- assign first_level_url = node.url | relative_url -%}
124
150
  {%- endif -%}
125
151
  {%- if node.has_children -%}
126
- {%- assign children_list = pages_list | where: "parent", node.title -%}
152
+ {%- assign children_list = "" | split: "" -%}
153
+ {%- for parent_group in groups_list -%}
154
+ {%- assign children_list = children_list | concat:
155
+ parent_group.items | where: "parent", node.title -%}
156
+ {%- endfor -%}
157
+ {%- if node.child_nav_order == 'desc' -%}
158
+ {%- assign children_list = children_list | reverse -%}
159
+ {%- endif -%}
127
160
  {%- for child in children_list -%}
128
161
  {%- if child.has_children -%}
129
- {%- if page.url == child.url or page.parent == child.title and page.grand_parent == child.parent -%}
162
+ {%- if page.url == child.url
163
+ or page.parent == child.title
164
+ and page.grand_parent == child.parent -%}
130
165
  {%- assign second_level_url = child.url | relative_url -%}
131
166
  {%- endif -%}
132
167
  {%- endif -%}
@@ -134,9 +169,19 @@
134
169
  {%- endif -%}
135
170
  {%- endif -%}
136
171
  {%- endfor -%}
172
+ {%- endfor -%}
137
173
 
138
174
  {% if page.has_children == true and page.has_toc != false %}
139
- {%- assign toc_list = pages_list | where: "parent", page.title | where: "grand_parent", page.parent -%}
175
+ {%- assign toc_list = "" | split: "" -%}
176
+ {%- for parent_group in groups_list -%}
177
+ {%- assign toc_list = toc_list
178
+ | concat: parent_group.items
179
+ | where: "parent", page.title
180
+ | where: "grand_parent", page.parent -%}
181
+ {%- endfor -%}
182
+ {%- if node.child_nav_order == 'desc' -%}
183
+ {%- assign toc_list = toc_list | reverse -%}
184
+ {%- endif -%}
140
185
  {%- endif -%}
141
186
 
142
187
  {%- endif -%}
@@ -7,6 +7,7 @@ layout: table_wrappers
7
7
  <html lang="{{ site.lang | default: 'en-US' }}">
8
8
  {% include head.html %}
9
9
  <body>
10
+ <a class="skip-to-main" href="#main-content">Skip to main content</a>
10
11
  <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
12
  <symbol id="svg-link" viewBox="0 0 24 24">
12
13
  <title>Link</title>
data/_sass/code.scss CHANGED
@@ -48,7 +48,7 @@ a:visited code {
48
48
 
49
49
  // ```[LANG]...```
50
50
  div.highlighter-rouge,
51
- div.listingblock {
51
+ div.listingblock > div.content {
52
52
  padding: $sp-3;
53
53
  margin-top: 0;
54
54
  margin-bottom: $sp-3;
@@ -119,7 +119,8 @@ figure.highlight {
119
119
  // Code examples (rendered)
120
120
  //
121
121
 
122
- .code-example {
122
+ .code-example,
123
+ .listingblock > .title {
123
124
  padding: $sp-3;
124
125
  margin-bottom: $sp-3;
125
126
  overflow: auto;
@@ -128,6 +129,7 @@ figure.highlight {
128
129
 
129
130
  + .highlighter-rouge,
130
131
  + .sectionbody .listingblock,
132
+ + .content,
131
133
  + figure.highlight {
132
134
  position: relative;
133
135
  margin-top: -$sp-4;
data/_sass/modules.scss CHANGED
@@ -14,3 +14,4 @@
14
14
  @import "./code";
15
15
  @import "./utilities/utilities";
16
16
  @import "./print";
17
+ @import "./skiptomain";
@@ -0,0 +1,30 @@
1
+ // Skipnav
2
+ // Skip to main content
3
+
4
+ a.skip-to-main {
5
+ left: -999px;
6
+ position: absolute;
7
+ top: auto;
8
+ width: 1px;
9
+ height: 1px;
10
+ overflow: hidden;
11
+ z-index: -999;
12
+ }
13
+
14
+ a.skip-to-main:focus,
15
+ a.skip-to-main:active {
16
+ color: $link-color;
17
+ background-color: $body-background-color;
18
+ left: auto;
19
+ top: auto;
20
+ width: 30%;
21
+ height: auto;
22
+ overflow: auto;
23
+ margin: 10px 35%;
24
+ padding: 5px;
25
+ border-radius: 15px;
26
+ border: 4px solid $btn-primary-color;
27
+ text-align: center;
28
+ font-size: 1.2em;
29
+ z-index: 999;
30
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: just-the-docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0.rc1
4
+ version: 0.4.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Marsceill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-08-12 00:00:00.000000000 Z
12
+ date: 2022-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -117,6 +117,7 @@ files:
117
117
  - _sass/navigation.scss
118
118
  - _sass/print.scss
119
119
  - _sass/search.scss
120
+ - _sass/skiptomain.scss
120
121
  - _sass/support/_functions.scss
121
122
  - _sass/support/_variables.scss
122
123
  - _sass/support/mixins/_buttons.scss