add reversed, deprecate desc for nav child_nav_order (#1061)

* Add 'reversed' as the preferred keyword, with 'desc' as a deprecated alternate

* Doc updates

* Add the test for 'reversed' to the toc_list

Add also a comment about this.

Co-authored-by: Peter Mosses <18308236+pdmosses@users.noreply.github.com>
This commit is contained in:
John Mertic
2022-12-17 10:21:42 -05:00
committed by GitHub
parent 9996d66940
commit 7c3936a55d
2 changed files with 9 additions and 8 deletions

View File

@@ -146,17 +146,17 @@ The Buttons page appears as a child of UI Components and appears second in the U
### Ordering child pages
You can optionally add the following to the YAML front matter to change the default sort order of child pages from ascending to descending order:
You can optionally add the following to the YAML front matter to reverse the default sort order of child pages:
- `child_nav_order: desc`
- `child_nav_order: reversed`
#### Example
{: .no_toc }
```yaml
---
layout: default
title: Descending Child Pages
child_nav_order: desc
title: Reversed Child Pages
child_nav_order: reversed
---
```