diff --git a/404.html b/404.html index 1e7a37ef8cdad11a67bfafabf2d668b18c294362..5fde9668325462713f0b0434a3612d669a5ee35c 100644 --- a/404.html +++ b/404.html @@ -1,6 +1,6 @@ --- layout: default -title: Page not found +title: 404 permalink: /404 nav_exclude: true search_exclude: true diff --git a/_config.yml b/_config.yml index aca049e16c3d786845d6231280b8b7aacad68e9c..d2119ef1a4ee9183fecdd3537ad621083e7e7810 100644 --- a/_config.yml +++ b/_config.yml @@ -19,7 +19,15 @@ baseurl: "/just-the-docs" # the subpath of your site, e.g. /blog url: "https://pmarsceill.github.io" # the base hostname & protocol for your site, e.g. http://example.com permalink: pretty -exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile"] +exclude: ["node_modules/", "*.gemspec", "*.gem", "Gemfile", "Gemfile.lock", "package.json", "package-lock.json", "script/", "LICENSE.txt", "lib/", "bin/", "README.md", "Rakefile" +, "docs/tests/" +] + +# Regression tests +# By default, the pages in /docs/tests are excluded when the ste is built. +# To include them, comment-out the relevant line above. +# Uncommenting the following line doesn't work - see https://github.com/jekyll/jekyll/issues/4791 +# include: ["docs/tests/"] # Set a path/url to a logo that will be displayed instead of the title #logo: "/assets/images/just-the-docs.png" @@ -63,8 +71,8 @@ aux_links: aux_links_new_tab: false # Sort order for navigation links -nav_sort: case_insensitive # default, equivalent to nil -# nav_sort: case_sensitive # Capital letters sorted before lowercase +# nav_sort: case_insensitive # default, equivalent to nil +nav_sort: case_sensitive # Capital letters sorted before lowercase # Footer content # appears at the bottom of every page's main content diff --git a/_includes/nav.html b/_includes/nav.html index 2eafe51510c128f122d723c4302233e7672abf58..a70e2b0a7c306b84b87154514473d3d54af4dc61 100644 --- a/_includes/nav.html +++ b/_includes/nav.html @@ -1,55 +1,100 @@ <ul class="nav-list"> - {%- assign ordered_pages_list = include.pages | where_exp:"item", "item.nav_order != nil" -%} - {%- assign unordered_pages_list = include.pages | where_exp:"item", "item.nav_order == nil" -%} + {%- assign included_pages = site.html_pages + | where_exp:"item", "item.nav_exclude != true" + | where_exp:"item", "item.title != nil" -%} + + {%- comment -%} + The values of `title` and `nav_order` can be numbers or strings. + Jekyll gives build failures when sorting on mixtures of different types, + so numbers and strings need to be sorted separately. + + Here, numbers are sorted by their values, and come before all strings. + An omitted `nav_order` value is equivalent to the page's `title` value + (except that a numerical `title` value is treated as a string). + + The case-sensitivity of string sorting is determined by `site.nav_sort`. + {%- endcomment -%} + + {%- assign string_ordered_pages = included_pages + | where_exp:"item", "item.nav_order == nil" -%} + {%- assign nav_ordered_pages = included_pages + | where_exp:"item", "item.nav_order != nil" -%} + + {%- comment -%} + The nav_ordered_pages have to be added to number_ordered_pages and + string_ordered_pages, depending on the nav_order value. + The first character of the jsonify result is `"` only for strings. + {%- endcomment -%} + {%- assign nav_ordered_groups = nav_ordered_pages + | group_by_exp:"item", "item.nav_order | jsonify | slice: 0" -%} + {%- assign number_ordered_pages = "" | split:"X" -%} + {%- for group in nav_ordered_groups -%} + {%- if group.name == '"' -%} + {%- assign string_ordered_pages = string_ordered_pages | concat: group.items -%} + {%- else -%} + {%- assign number_ordered_pages = number_ordered_pages | concat: group.items -%} + {%- endif -%} + {%- endfor -%} + + {%- assign sorted_number_ordered_pages = number_ordered_pages | sort:"nav_order" -%} + + {%- comment -%} + The string_ordered_pages have to be sorted by nav_order, and otherwise title + (where appending the empty string to a numeric title converts it to a string). + After grouping them by those values, the groups are sorted, then the items + of each group are concatenated. + {%- endcomment -%} + {%- assign string_ordered_groups = string_ordered_pages + | group_by_exp:"item", "item.nav_order | default: item.title | append:''" -%} {%- if site.nav_sort == 'case_insensitive' -%} - {%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%} - {%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%} + {%- assign sorted_string_ordered_groups = string_ordered_groups | sort_natural:"name" -%} {%- else -%} - {%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%} - {%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%} + {%- assign sorted_string_ordered_groups = string_ordered_groups | sort:"name" -%} {%- endif -%} - {%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%} + {%- assign sorted_string_ordered_pages = "" | split:"X" -%} + {%- for group in sorted_string_ordered_groups -%} + {%- assign sorted_string_ordered_pages = sorted_string_ordered_pages | concat: group.items -%} + {%- endfor -%} + + {%- assign pages_list = sorted_number_ordered_pages | concat: sorted_string_ordered_pages -%} + {%- for node in pages_list -%} - {%- unless node.nav_exclude -%} - {%- if node.parent == nil and node.title -%} - <li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"> - {%- if page.parent == node.title or page.grand_parent == node.title -%} - {%- assign first_level_url = node.url | relative_url -%} - {%- endif -%} - {%- if node.has_children -%} - <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> - {%- endif -%} - <a href="{{ node.url | relative_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a> - {%- if node.has_children -%} - {%- assign children_list = pages_list | where: "parent", node.title -%} - <ul class="nav-list "> - {%- for child in children_list -%} - {%- unless child.nav_exclude -%} - <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"> - {%- if page.url == child.url or page.parent == child.title -%} - {%- assign second_level_url = child.url | relative_url -%} - {%- endif -%} - {%- if child.has_children -%} - <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> - {%- endif -%} - <a href="{{ child.url | relative_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> - {%- if child.has_children -%} - {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%} - <ul class="nav-list"> - {%- for grand_child in grand_children_list -%} - <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}"> - <a href="{{ grand_child.url | relative_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a> - </li> - {%- endfor -%} - </ul> - {%- endif -%} - </li> - {%- endunless -%} - {%- endfor -%} - </ul> - {%- endif -%} - </li> - {%- endif -%} - {%- endunless -%} + {%- if node.parent == nil -%} + <li class="nav-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}"> + {%- if page.parent == node.title or page.grand_parent == node.title -%} + {%- assign first_level_url = node.url | absolute_url -%} + {%- endif -%} + {%- if node.has_children -%} + <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> + {%- endif -%} + <a href="{{ node.url | absolute_url }}" class="nav-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a> + {%- if node.has_children -%} + {%- assign children_list = pages_list | where: "parent", node.title -%} + <ul class="nav-list "> + {%- for child in children_list -%} + <li class="nav-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}"> + {%- if page.url == child.url or page.parent == child.title -%} + {%- assign second_level_url = child.url | absolute_url -%} + {%- endif -%} + {%- if child.has_children -%} + <a href="#" class="nav-list-expander"><svg viewBox="0 0 24 24"><use xlink:href="#svg-arrow-right"></use></svg></a> + {%- endif -%} + <a href="{{ child.url | absolute_url }}" class="nav-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a> + {%- if child.has_children -%} + {%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%} + <ul class="nav-list"> + {%- for grand_child in grand_children_list -%} + <li class="nav-list-item {% if page.url == grand_child.url %} active{% endif %}"> + <a href="{{ grand_child.url | absolute_url }}" class="nav-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a> + </li> + {%- endfor -%} + </ul> + {%- endif -%} + </li> + {%- endfor -%} + </ul> + {%- endif -%} + </li> + {%- endif -%} {%- endfor -%} </ul> diff --git a/docs/navigation-structure.md b/docs/navigation-structure.md index d5a75041f5dd8f179f316a183ef043bc990f6b54..bb601d4705629bd0637cc6b39776e3c6a71e99d8 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 } - +<details open markdown="block"> + <summary> + Table of contents + </summary> + {: .text-delta } 1. TOC {:toc} +</details> --- @@ -25,7 +28,7 @@ By default, all pages will appear as top level pages in the main nav unless a pa ## Ordering pages -To specify a page order, use the `nav_order` parameter in your pages' YAML front matter. +To specify a page order, you can use the `nav_order` parameter in your pages' YAML front matter. #### Example {: .no_toc } @@ -38,12 +41,13 @@ nav_order: 4 --- ``` -The specified `nav_order` parameters on a site should be all integers or all strings. -Pages without a `nav_order` parameter are ordered alphabetically by their `title`, -and appear after the explicitly-ordered pages at each level. -By default, all Capital letters are sorted before all lowercase letters; -adding `nav_sort: case_insensitive` in the configuration file ignores case -when sorting strings (but also sorts numbers lexicographically: `10` comes before `1`). +The parameter values determine the order of the top-level pages, and of child pages with the same parent. You can reuse the same parameter values (e.g., integers starting from 1) for the child pages of different parents. + +The parameter values can be numbers (integers, floats) and/or strings. When you omit `nav_order` parameters, they default to the titles of the pages, which are ordered alphabetically. Pages with numerical `nav_order` parameters always come before those with strings or default `nav_order` parameters. If you want to make the page order independent of the page titles, you can set explicit `nav_order` parameters on all pages. + +By default, all Capital letters come before all lowercase letters; you can add `nav_sort: case_insensitive` in the configuration file to ignore the case. Enclosing strings in quotation marks is optional. + +> *Note for users of previous versions:* `nav_sort: case_insensitive` previously affected the ordering of numerical `nav_order` parameters: e.g., `10` came before `2`. Also, all pages with explicit `nav_order` parameters previously came before all pages with default parameters. Both were potentially confusing, and they have now been eliminated. --- @@ -62,6 +66,8 @@ nav_exclude: true --- ``` +Pages with no `title` are automatically excluded from the navigation. + --- ## Pages with children diff --git a/docs/tests/index.md b/docs/tests/index.md new file mode 100644 index 0000000000000000000000000000000000000000..27fc4d758ff6fe47b261f84e11ac2dcc31d7e138 --- /dev/null +++ b/docs/tests/index.md @@ -0,0 +1,22 @@ +--- +layout: default +title: Tests +has_children: true +nav_order: 100 +--- + +# Tests + + The main documentation pages of this theme illustrate the use of many of its features, which to some extent tests their implementation. The pages linked below provide further test cases for particular features, and may be useful for regression testing when developing new features. + +The default configuration does not include the test pages. To include them, *commment-out* the following line in `_config.yml`: + +```yaml +, "docs/tests/" +``` +so that it is: +```yaml +# , "docs/tests/" +``` + +(Apparently Jekyll's `include` does *not* override `exclude` for the same folder...) diff --git a/docs/tests/navigation/exclude/excluded-child.md b/docs/tests/navigation/exclude/excluded-child.md new file mode 100644 index 0000000000000000000000000000000000000000..b7b4f9aedc8e09f0d122663572762991c63e85dd --- /dev/null +++ b/docs/tests/navigation/exclude/excluded-child.md @@ -0,0 +1,15 @@ +--- +layout: default +title: Excluded Child +parent: Not Excluded +nav_exclude: true +--- +# Excluded Child + +This child page is explicitly excluded, and should not appear in the navigation. + +```yaml +title: Excluded Child +parent: Not Excluded +nav_exclude: true +``` diff --git a/docs/tests/navigation/exclude/excluded-grandchild.md b/docs/tests/navigation/exclude/excluded-grandchild.md new file mode 100644 index 0000000000000000000000000000000000000000..2e3eadf0495582cbc1bf607d43dde3eba22588d2 --- /dev/null +++ b/docs/tests/navigation/exclude/excluded-grandchild.md @@ -0,0 +1,17 @@ +--- +layout: default +title: Excluded Grandchild +parent: Non-excluded Child +grand_parent: Non-excluded +nav_exclude: true +--- +# Excluded Grandchild + +This grandchild page is explicitly excluded, and should not appear in the navigation. + +```yaml +title: Excluded Grandchild +parent: Non-excluded Child +grand_parent: Non-excluded +nav_exclude: true +``` diff --git a/docs/tests/navigation/exclude/excluded.md b/docs/tests/navigation/exclude/excluded.md new file mode 100644 index 0000000000000000000000000000000000000000..50cebd3876c09037d51028f564df22748a2aca15 --- /dev/null +++ b/docs/tests/navigation/exclude/excluded.md @@ -0,0 +1,15 @@ +--- +layout: default +title: Excluded +has_children: true +nav_exclude: true +--- +# Excluded + +This top-level page is explicitly excluded, and should not appear in the navigation. Any child pages are implicitly excluded. + +```yaml +title: Excluded +has_children: true +nav_exclude: true +``` diff --git a/docs/tests/navigation/exclude/non-excluded-child-of-excluded.md b/docs/tests/navigation/exclude/non-excluded-child-of-excluded.md new file mode 100644 index 0000000000000000000000000000000000000000..efe478c262bb8e1ad3c8e347d581033e62ceb4e1 --- /dev/null +++ b/docs/tests/navigation/exclude/non-excluded-child-of-excluded.md @@ -0,0 +1,15 @@ +--- +layout: default +title: Non-excluded Child of Excluded +parent: Excluded +nav_exclude: false +--- +# Non-excluded Child of Excluded + +This child page is explicitly not excluded, but its parent page is excluded, so it should not appear in the navigation. + +```yaml +title: Non-excluded Child of Excluded +parent: Excluded +nav_exclude: false +``` diff --git a/docs/tests/navigation/exclude/non-excluded-child.md b/docs/tests/navigation/exclude/non-excluded-child.md new file mode 100644 index 0000000000000000000000000000000000000000..b7ec02dc1da2daa3c158696b12f6bd893cc5f44d --- /dev/null +++ b/docs/tests/navigation/exclude/non-excluded-child.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Non-excluded Child +parent: Non-excluded +has_children: true +nav_exclude: false +--- +# Non-excluded Child + +This child page is explicitly not excluded, and should appear in the navigation. + +```yaml +title: Non-excluded Child +parent: Non-excluded +nav_exclude: false +``` diff --git a/docs/tests/navigation/exclude/non-excluded-grandchild-of-excluded.md b/docs/tests/navigation/exclude/non-excluded-grandchild-of-excluded.md new file mode 100644 index 0000000000000000000000000000000000000000..8dc7720d84d8a9ad847119985fc491373bf44ee4 --- /dev/null +++ b/docs/tests/navigation/exclude/non-excluded-grandchild-of-excluded.md @@ -0,0 +1,17 @@ +--- +layout: default +title: Non-excluded Grandchild of Excluded +parent: Non-excluded Child +grand_parent: Excluded +nav_exclude: false +--- +# Non-excluded Grandchild of Excluded + +This grandchild page is explicitly not excluded, and neither is its parent page; but its grandparent page is excluded, so it should not appear in the navigation. + +```yaml +title: Non-excluded Grandchild of Excluded +parent: Non-excluded Child +grand_parent: Excluded +nav_exclude: false +``` diff --git a/docs/tests/navigation/exclude/non-excluded-grandchild.md b/docs/tests/navigation/exclude/non-excluded-grandchild.md new file mode 100644 index 0000000000000000000000000000000000000000..6fc2dd1d172bf7544fec587d8f1410dc1cdf9c32 --- /dev/null +++ b/docs/tests/navigation/exclude/non-excluded-grandchild.md @@ -0,0 +1,17 @@ +--- +layout: default +title: Non-excluded Grandchild +parent: Non-excluded Child +grand_parent: Non-excluded +nav_exclude: false +--- +# Non-excluded Grandchild + +This grandchild page is explicitly not excluded, and neither is its parent page nor its grandparent page, so it should appear in the navigation. + +```yaml +title: Non-excluded Grandchild of Excluded +parent: Non-excluded Child +grand_parent: Excluded +nav_exclude: false +``` diff --git a/docs/tests/navigation/exclude/non-excluded.md b/docs/tests/navigation/exclude/non-excluded.md new file mode 100644 index 0000000000000000000000000000000000000000..849c4f2f7598f00db5fc1b0870e3b8047e013ff2 --- /dev/null +++ b/docs/tests/navigation/exclude/non-excluded.md @@ -0,0 +1,14 @@ +--- +layout: default +title: Non-excluded +has_children: true +nav_exclude: false +--- +# Non-excluded + +This top-level page is explicitly not excluded, and should appear in the navigation. + +```yaml +title: Non-excluded +nav_exclude: false +``` diff --git a/docs/tests/navigation/exclude/untitled.md b/docs/tests/navigation/exclude/untitled.md new file mode 100644 index 0000000000000000000000000000000000000000..ff619258e8c5d19c44631fc160f95cf3b13e30e9 --- /dev/null +++ b/docs/tests/navigation/exclude/untitled.md @@ -0,0 +1,6 @@ +--- +layout: default +--- +# Untitled + +This page has no `title`, and should not appear in the navigation. diff --git a/docs/tests/navigation/grandparent/a.md b/docs/tests/navigation/grandparent/a.md new file mode 100644 index 0000000000000000000000000000000000000000..23bed508194a1a7614dc7df0ec7409536aecbd21 --- /dev/null +++ b/docs/tests/navigation/grandparent/a.md @@ -0,0 +1,14 @@ +--- +layout: default +title: A +has_children: true +--- + +# A + +A top-level page + +```yaml +title: A +has_children: true +``` diff --git a/docs/tests/navigation/grandparent/b.md b/docs/tests/navigation/grandparent/b.md new file mode 100644 index 0000000000000000000000000000000000000000..7973bf0f5e7eb1a1d65e31e1ed06b10b2d68c82e --- /dev/null +++ b/docs/tests/navigation/grandparent/b.md @@ -0,0 +1,14 @@ +--- +layout: default +title: B +has_children: true +--- + +# B + +A top-level page + +```yaml +title: B +has_children: true +``` diff --git a/docs/tests/navigation/grandparent/ca.md b/docs/tests/navigation/grandparent/ca.md new file mode 100644 index 0000000000000000000000000000000000000000..525428e1b55b6125e78c546a05577341f6d98694 --- /dev/null +++ b/docs/tests/navigation/grandparent/ca.md @@ -0,0 +1,16 @@ +--- +layout: default +title: C +parent: A +has_children: true +--- + +# C + +A child of page A, and parent of page D + +```yaml +title: C +parent: A +has_children: true +``` diff --git a/docs/tests/navigation/grandparent/cb.md b/docs/tests/navigation/grandparent/cb.md new file mode 100644 index 0000000000000000000000000000000000000000..1baa41b8e45a0e129d7a8fce28ef380fbba701f4 --- /dev/null +++ b/docs/tests/navigation/grandparent/cb.md @@ -0,0 +1,16 @@ +--- +layout: default +title: C +parent: B +has_children: true +--- + +# C + +A child of page B, and parent of page D + +```yaml +title: C +parent: B +has_children: true +``` diff --git a/docs/tests/navigation/grandparent/dca.md b/docs/tests/navigation/grandparent/dca.md new file mode 100644 index 0000000000000000000000000000000000000000..5ff758479a6c9230747df655e4914af38780f3c3 --- /dev/null +++ b/docs/tests/navigation/grandparent/dca.md @@ -0,0 +1,16 @@ +--- +layout: default +title: D +parent: C +grand_parent: A +--- + +# D + +A grandchild of page A + +```yaml +title: D +parent: C +grand_parent: A +``` diff --git a/docs/tests/navigation/grandparent/dcb.md b/docs/tests/navigation/grandparent/dcb.md new file mode 100644 index 0000000000000000000000000000000000000000..567025d57f7a5f594f6b62dfc93b72eb7c26802e --- /dev/null +++ b/docs/tests/navigation/grandparent/dcb.md @@ -0,0 +1,16 @@ +--- +layout: default +title: D +parent: C +grand_parent: B +--- + +# D + +A grandchild of page B + +```yaml +title: D +parent: C +grand_parent: B +``` diff --git a/docs/tests/navigation/index.md b/docs/tests/navigation/index.md new file mode 100644 index 0000000000000000000000000000000000000000..50587d895160116128b3edf281f7061f401e3a56 --- /dev/null +++ b/docs/tests/navigation/index.md @@ -0,0 +1,28 @@ +--- +layout: default +title: Navigation +parent: Tests +--- + +# Navigation + +## Parent page disambiguation + +- [Page A](grandparent/a/) has a child [page with title C](grandparent/ca/), and a grandchild [page with title D](grandparent/dca/). +- [Page B](grandparent/b/) has a child [page with title C](grandparent/cb/), and a grandchild [page with title D](grandparent/dcb/). +- The grandchild pages specify their parent and grandparent pages, so there is no ambiguity. + +## Page exclusion + +- An [untitled page](exclude/untitled/) is excluded from the navigation. +- An excluded [top level page](exclude/excluded/), [child page](exclude/excluded-child/), or [grandchild page](exclude/excluded-grandchild/) does not appear. +- A non-excluded [top level page](exclude/non-excluded/) appears; and a non-excluded [child page](exclude/non-excluded-child/) or [grandchild page](exclude/non-excluded-grandchild/) appears if its parent appears. +- A non-excluded child page or grandchild page does not appear if its parent is excluded. + +## Page order + +- [Default](order/default/), using `title` instead of `nav_order` fields. +- [Strings](order/strings/), lexicographically ordered, possibly case-insensitively. +- [Integers](order/integers/), numerically ordered. +- [Floats](order/floats/), numerically ordered. +- [Mixture](order/mixture/), with numbers before strings. diff --git a/docs/tests/navigation/order/default/10.md b/docs/tests/navigation/order/default/10.md new file mode 100644 index 0000000000000000000000000000000000000000..bd6fbb831d16e01929889ebcb41b80d1db6f3506 --- /dev/null +++ b/docs/tests/navigation/order/default/10.md @@ -0,0 +1,14 @@ +--- +layout: default +title: "10" +parent: Default +grand_parent: Order +--- + +# 10 + +```yaml +title: "10" +parent: Default +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/default/2.md b/docs/tests/navigation/order/default/2.md new file mode 100644 index 0000000000000000000000000000000000000000..5e2792b794d192f53869d1f262c02f64f0149c93 --- /dev/null +++ b/docs/tests/navigation/order/default/2.md @@ -0,0 +1,14 @@ +--- +layout: default +title: "2" +parent: Default +grand_parent: Order +--- + +# 2 + +```yaml +title: "2" +parent: Default +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/default/a.md b/docs/tests/navigation/order/default/a.md new file mode 100644 index 0000000000000000000000000000000000000000..a122e97170c2144a10ff443121b06c0e5ac9c9d9 --- /dev/null +++ b/docs/tests/navigation/order/default/a.md @@ -0,0 +1,14 @@ +--- +layout: default +title: A +parent: Default +grand_parent: Order +--- + +# A + +```yaml +title: A +parent: Default +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/default/aa-lower.md b/docs/tests/navigation/order/default/aa-lower.md new file mode 100644 index 0000000000000000000000000000000000000000..43957d618d452faf82cc569a8b7da84672a00189 --- /dev/null +++ b/docs/tests/navigation/order/default/aa-lower.md @@ -0,0 +1,14 @@ +--- +layout: default +title: aa +parent: Default +grand_parent: Order +--- + +# aa + +```yaml +title: aa +parent: Default +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/default/aa.md b/docs/tests/navigation/order/default/aa.md new file mode 100644 index 0000000000000000000000000000000000000000..081bcfc07ac04e5efbd6c2626f90e5ed2b9bd5f4 --- /dev/null +++ b/docs/tests/navigation/order/default/aa.md @@ -0,0 +1,14 @@ +--- +layout: default +title: Aa +parent: Default +grand_parent: Order +--- + +# Aa + +```yaml +title: Aa +parent: Default +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/default/index.md b/docs/tests/navigation/order/default/index.md new file mode 100644 index 0000000000000000000000000000000000000000..d672d77906d99ea2858660656b7090b97ff96d3f --- /dev/null +++ b/docs/tests/navigation/order/default/index.md @@ -0,0 +1,15 @@ +--- +layout: default +title: Default +parent: Order +nav_order: 1 +has_children: true +--- + +# Default Order + +When `nav_order` fields are omitted, the pages are ordered alphabetically by their titles. + +By default, all Capital letters come before all lowercase letters; you can add `nav_sort: case_insensitive` in the configuration file to ignore the case). + +Digits precede letters, and numeric titles are ordered lexicographically: `10` precedes `2` (in contrast to explicit numeric `nav_order` values). diff --git a/docs/tests/navigation/order/floats/-1.1.md b/docs/tests/navigation/order/floats/-1.1.md new file mode 100644 index 0000000000000000000000000000000000000000..3466e76cb52d03a02a8b35d7e6b149e3e8c331fd --- /dev/null +++ b/docs/tests/navigation/order/floats/-1.1.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "-1.1" +nav_order: -1.1 +parent: Floats +grand_parent: Order +--- + +# -1.1 + +```yaml +title: "-1.1" +nav_order: -1.1 +parent: Floats +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/floats/0.0.md b/docs/tests/navigation/order/floats/0.0.md new file mode 100644 index 0000000000000000000000000000000000000000..6c545baf7369aa983ad4476b1c6818763ff4841f --- /dev/null +++ b/docs/tests/navigation/order/floats/0.0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "0.0" +nav_order: 0.0 +parent: Floats +grand_parent: Order +--- + +# 0.0 + +```yaml +title: "0.0" +nav_order: 0.0 +parent: Floats +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/floats/10.0.md b/docs/tests/navigation/order/floats/10.0.md new file mode 100644 index 0000000000000000000000000000000000000000..fc648c4650a322dc2bf940061c18472263f8c590 --- /dev/null +++ b/docs/tests/navigation/order/floats/10.0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "10.0" +nav_order: 10.0 +parent: Floats +grand_parent: Order +--- + +# 10.0 + +```yaml +title: "10.0" +nav_order: 10.0 +parent: Floats +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/floats/2.2222.md b/docs/tests/navigation/order/floats/2.2222.md new file mode 100644 index 0000000000000000000000000000000000000000..8050d7ba8e89956f23f96a7f6f40909cabf78b7c --- /dev/null +++ b/docs/tests/navigation/order/floats/2.2222.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "2.2222" +nav_order: 2.2222 +parent: Floats +grand_parent: Order +--- + +# 2.2222 + +```yaml +title: "2.2222" +nav_order: 2.2222 +parent: Floats +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/floats/index.md b/docs/tests/navigation/order/floats/index.md new file mode 100644 index 0000000000000000000000000000000000000000..2a3db3721970e1e6d578b3ed2f86018dbe3414cd --- /dev/null +++ b/docs/tests/navigation/order/floats/index.md @@ -0,0 +1,13 @@ +--- +layout: default +title: Floats +parent: Order +nav_order: 4 +has_children: true +--- + +# Floating-Point Order + +When `nav_order` fields are floating-point numbers, the pages are ordered in increasing order of the numerical values. + +Floats include `0.0` and negative values. diff --git a/docs/tests/navigation/order/index.md b/docs/tests/navigation/order/index.md new file mode 100644 index 0000000000000000000000000000000000000000..c1b488aad1b7fd23885816751d41bfccef36b638 --- /dev/null +++ b/docs/tests/navigation/order/index.md @@ -0,0 +1,8 @@ +--- +layout: default +title: Order +has_children: true +nav_order: 110 +--- + +# Order diff --git a/docs/tests/navigation/order/integers/-1.md b/docs/tests/navigation/order/integers/-1.md new file mode 100644 index 0000000000000000000000000000000000000000..5b6e22962d201040facef77b2e9fef3dd6d2123e --- /dev/null +++ b/docs/tests/navigation/order/integers/-1.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "-1" +nav_order: -1 +parent: Integers +grand_parent: Order +--- + +# -1 + +```yaml +title: "-1" +nav_order: -1 +parent: Integers +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/integers/0.md b/docs/tests/navigation/order/integers/0.md new file mode 100644 index 0000000000000000000000000000000000000000..f97f599399e82b8667f7f4d7a3834275e704ed37 --- /dev/null +++ b/docs/tests/navigation/order/integers/0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "0" +nav_order: 0 +parent: Integers +grand_parent: Order +--- + +# 0 + +```yaml +title: "0" +nav_order: 0 +parent: Integers +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/integers/10.md b/docs/tests/navigation/order/integers/10.md new file mode 100644 index 0000000000000000000000000000000000000000..181bffb8d2b03c2b3666bf813107334acf3f6f79 --- /dev/null +++ b/docs/tests/navigation/order/integers/10.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "10" +nav_order: 10 +parent: Integers +grand_parent: Order +--- + +# 10 + +```yaml +title: "10" +nav_order: 10 +parent: Integers +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/integers/2.md b/docs/tests/navigation/order/integers/2.md new file mode 100644 index 0000000000000000000000000000000000000000..51c76c75cc662210655cb32310c27bed5534f20c --- /dev/null +++ b/docs/tests/navigation/order/integers/2.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "2" +nav_order: 2 +parent: Integers +grand_parent: Order +--- + +# 2 + +```yaml +title: "2" +nav_order: 2 +parent: Integers +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/integers/index.md b/docs/tests/navigation/order/integers/index.md new file mode 100644 index 0000000000000000000000000000000000000000..674c841f7d7581d401d74f73ed15df50086711df --- /dev/null +++ b/docs/tests/navigation/order/integers/index.md @@ -0,0 +1,13 @@ +--- +layout: default +title: Integers +parent: Order +nav_order: 3 +has_children: true +--- + +# Integer Order + +When `nav_order` fields are integers, the pages are ordered in increasing order of the numerical values. + +Integers include `0` and negative values. Integers can be reused for top-level pages and for different sets of child pages. diff --git a/docs/tests/navigation/order/mixture/-1.1.md b/docs/tests/navigation/order/mixture/-1.1.md new file mode 100644 index 0000000000000000000000000000000000000000..60b8a6035fb5b06d8bcc591c216578c6a0192552 --- /dev/null +++ b/docs/tests/navigation/order/mixture/-1.1.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "-1.1" +nav_order: -1.1 +parent: Mixture +grand_parent: Order +--- + +# -1.1 + +```yaml +title: "-1.1" +nav_order: -1.1 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/-1.md b/docs/tests/navigation/order/mixture/-1.md new file mode 100644 index 0000000000000000000000000000000000000000..81c247f879b598669b9334e098125f0fdd798522 --- /dev/null +++ b/docs/tests/navigation/order/mixture/-1.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "-1" +nav_order: -1 +parent: Mixture +grand_parent: Order +--- + +# -1 + +```yaml +title: "-1" +nav_order: -1 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/0.0.md b/docs/tests/navigation/order/mixture/0.0.md new file mode 100644 index 0000000000000000000000000000000000000000..46ea906dc24dd76ebaf8883ca11c2882d4a1a14f --- /dev/null +++ b/docs/tests/navigation/order/mixture/0.0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "0.0" +nav_order: 0.0 +parent: Mixture +grand_parent: Order +--- + +# 0.0 + +```yaml +title: "0.0" +nav_order: 0.0 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/0.md b/docs/tests/navigation/order/mixture/0.md new file mode 100644 index 0000000000000000000000000000000000000000..5fb96d81aedc522a4850625cfa8f3c781d32a47c --- /dev/null +++ b/docs/tests/navigation/order/mixture/0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "0" +nav_order: 0 +parent: Mixture +grand_parent: Order +--- + +# 0 + +```yaml +title: "0" +nav_order: 0 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/10.0.md b/docs/tests/navigation/order/mixture/10.0.md new file mode 100644 index 0000000000000000000000000000000000000000..4f137a866ce5260a49fee307ee01d4b1591cd5fb --- /dev/null +++ b/docs/tests/navigation/order/mixture/10.0.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "10.0" +nav_order: 10.0 +parent: Mixture +grand_parent: Order +--- + +# 10.0 + +```yaml +title: "10.0" +nav_order: 10.0 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/10.md b/docs/tests/navigation/order/mixture/10.md new file mode 100644 index 0000000000000000000000000000000000000000..03c7c8870dc32593deea59f61e9390a4b99ba4e8 --- /dev/null +++ b/docs/tests/navigation/order/mixture/10.md @@ -0,0 +1,14 @@ +--- +layout: default +title: "10" +parent: Mixture +grand_parent: Order +--- + +# 10 + +```yaml +title: "10" +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/2.2222.md b/docs/tests/navigation/order/mixture/2.2222.md new file mode 100644 index 0000000000000000000000000000000000000000..b8d74fb6019468154ae7ab82b0c61b62936bd94f --- /dev/null +++ b/docs/tests/navigation/order/mixture/2.2222.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "2.2222" +nav_order: 2.2222 +parent: Mixture +grand_parent: Order +--- + +# 2.2222 + +```yaml +title: "2.2222" +nav_order: 2.2222 +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/2.md b/docs/tests/navigation/order/mixture/2.md new file mode 100644 index 0000000000000000000000000000000000000000..22e118b5cf5a763e8646225c4468c4b68d296825 --- /dev/null +++ b/docs/tests/navigation/order/mixture/2.md @@ -0,0 +1,14 @@ +--- +layout: default +title: "2" +parent: Mixture +grand_parent: Order +--- + +# 2 + +```yaml +title: "2" +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/a.md b/docs/tests/navigation/order/mixture/a.md new file mode 100644 index 0000000000000000000000000000000000000000..8d367652efe91987370ae450d4e8fd91317fa878 --- /dev/null +++ b/docs/tests/navigation/order/mixture/a.md @@ -0,0 +1,14 @@ +--- +layout: default +title: A +parent: Mixture +grand_parent: Order +--- + +# A + +```yaml +title: A +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/aa-lower.md b/docs/tests/navigation/order/mixture/aa-lower.md new file mode 100644 index 0000000000000000000000000000000000000000..12a86312f92145ee352de43e41a477d4ef0568ca --- /dev/null +++ b/docs/tests/navigation/order/mixture/aa-lower.md @@ -0,0 +1,16 @@ +--- +layout: default +title: aa +nav_order: "aa" +parent: Mixture +grand_parent: Order +--- + +# aa + +```yaml +title: aa +nav_order: "aa" +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/aa.md b/docs/tests/navigation/order/mixture/aa.md new file mode 100644 index 0000000000000000000000000000000000000000..d826339c542d47fbf57b00a417b3b4c26b181bc3 --- /dev/null +++ b/docs/tests/navigation/order/mixture/aa.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Aa +nav_order: "Aa" +parent: Mixture +grand_parent: Order +--- + +# Aa + +```yaml +title: Aa +nav_order: "Aa" +parent: Mixture +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/mixture/index.md b/docs/tests/navigation/order/mixture/index.md new file mode 100644 index 0000000000000000000000000000000000000000..1d45bc7d4619cc13cc510ac228ef25a0575d980b --- /dev/null +++ b/docs/tests/navigation/order/mixture/index.md @@ -0,0 +1,11 @@ +--- +layout: default +title: Mixture +parent: Order +nav_order: 5 +has_children: true +--- + +# Mixed Order + +It seems unlikely that different types of `nav_order` values are needed for the children of the same parent. diff --git a/docs/tests/navigation/order/strings/10.md b/docs/tests/navigation/order/strings/10.md new file mode 100644 index 0000000000000000000000000000000000000000..4bc8b59f6553cfd9ac0dfa4076340f7285e45867 --- /dev/null +++ b/docs/tests/navigation/order/strings/10.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "10" +nav_order: "10" +parent: Strings +grand_parent: Order +--- + +# 10 + +```yaml +title: "10" +nav_order: "10" +parent: Strings +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/strings/2.md b/docs/tests/navigation/order/strings/2.md new file mode 100644 index 0000000000000000000000000000000000000000..be13a98bfc5aa27a2d840ed67bbcd9df17a51be5 --- /dev/null +++ b/docs/tests/navigation/order/strings/2.md @@ -0,0 +1,16 @@ +--- +layout: default +title: "2" +nav_order: "2" +parent: Strings +grand_parent: Order +--- + +# 2 + +```yaml +title: "2" +nav_order: "2" +parent: Strings +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/strings/a.md b/docs/tests/navigation/order/strings/a.md new file mode 100644 index 0000000000000000000000000000000000000000..71dd447d980985bc9de35d3d3292bba4835855b4 --- /dev/null +++ b/docs/tests/navigation/order/strings/a.md @@ -0,0 +1,16 @@ +--- +layout: default +title: A +nav_order: A +parent: Strings +grand_parent: Order +--- + +# A + +```yaml +title: A +nav_order: A +parent: Strings +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/strings/aa-lower.md b/docs/tests/navigation/order/strings/aa-lower.md new file mode 100644 index 0000000000000000000000000000000000000000..ea9c10b8413fd44639bd9b6087f5f8d878f5e2bd --- /dev/null +++ b/docs/tests/navigation/order/strings/aa-lower.md @@ -0,0 +1,16 @@ +--- +layout: default +title: aa +nav_order: "aa" +parent: Strings +grand_parent: Order +--- + +# aa + +```yaml +title: aa +nav_order: "aa" +parent: Strings +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/strings/aa.md b/docs/tests/navigation/order/strings/aa.md new file mode 100644 index 0000000000000000000000000000000000000000..1daeb04668665289bbb5d994f245f24eb564a818 --- /dev/null +++ b/docs/tests/navigation/order/strings/aa.md @@ -0,0 +1,16 @@ +--- +layout: default +title: Aa +nav_order: "Aa" +parent: Strings +grand_parent: Order +--- + +# Aa + +```yaml +title: Aa +nav_order: "Aa" +parent: Strings +grand_parent: Order +``` diff --git a/docs/tests/navigation/order/strings/index.md b/docs/tests/navigation/order/strings/index.md new file mode 100644 index 0000000000000000000000000000000000000000..3eb5bc5406c059e2dcc4e83b790da838a922318d --- /dev/null +++ b/docs/tests/navigation/order/strings/index.md @@ -0,0 +1,13 @@ +--- +layout: default +title: Strings +parent: Order +nav_order: 2 +has_children: true +--- + +# String Order + +By default, all Capital letters come before all lowercase letters; you can add `nav_sort: case_insensitive` in the configuration file to ignore the case). + +Digits precede letters, and numeric titles are ordered lexicographically: `"10"` precedes `"2"` (in contrast to explicit numeric `nav_order` values). diff --git a/docs/ui-components/linenos.md b/docs/ui-components/linenos.md index b13e6c91a70afe210c0faff98e4888b9ac8c8549..a81d5113bb478d3e8ede8f6b8f5d4e25379ff7ea 100644 --- a/docs/ui-components/linenos.md +++ b/docs/ui-components/linenos.md @@ -27,7 +27,7 @@ following configuration option: kramdown: syntax_highlighter_opts: block: - line_numbers: false + line_numbers: true {% endhighlight %} Line numbers can then be suppressed locally using Liquid tags (_without_ the diff --git a/just-the-docs.gemspec b/just-the-docs.gemspec index 0c4d3a303a3b231090472d938333a2d50ef032a6..6d6d47e0900b255d695ff5d7bb54b755fd456d12 100644 --- a/just-the-docs.gemspec +++ b/just-the-docs.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.email = ["patrick.marsceill@gmail.com"] spec.summary = %q{A modern, highly customizable, and responsive Jekyll theme for documention with built-in search.} - spec.homepage = "https://github.com/pmarsceill/just-the-docs" + spec.homepage = "https://github.com/pdmosses/just-the-docs" spec.license = "MIT" spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(assets|bin|_layouts|_includes|lib|Rakefile|_sass|LICENSE|README)}i) }