Made case-insenstive sorting the default

Added a configuration option to determine whether the sort order is case-sensitive.
The default is case-insensitive.

To test:
- open `/just-the-docs/docs/utilities/` in the browser,
  and check that the navigation links in `Utilities` are sorted alphabetically;
- in `docs/utilities/layout.md', change the preamble to `title: layout`,
  and check that the  links in `Utilities` are still sorted alphabetically;
- add `nav_sort: case_sensitive` in the configuration file,
  and check that the link to `layout` is now listed last under `Utilities`.
This commit is contained in:
PLanCompS
2020-04-25 14:53:45 +02:00
parent 7e959f4b69
commit c46ccd3484
3 changed files with 16 additions and 3 deletions

View File

@@ -41,6 +41,8 @@ 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.
To sort all Capital letters before lowercase letters,
add `nav_sort: case_sensitive` in the configuration file.
---