mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Add 'child_nav_order' front matter to be able to sort navigation pages in reverse (#726)
Set `child_nav_order` to `desc` to reverse the sort order for a child section. Co-authored-by: Matt Wang <matt@matthewwang.me>
This commit is contained in:
@@ -145,6 +145,21 @@ nav_order: 2
|
||||
|
||||
The Buttons page appears as a child of UI Components and appears second in the UI Components section.
|
||||
|
||||
### 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:
|
||||
|
||||
- `child_nav_order: desc`
|
||||
|
||||
#### Example
|
||||
{: .no_toc }
|
||||
```yaml
|
||||
---
|
||||
layout: default
|
||||
title: Descending Child Pages
|
||||
child_nav_order: desc
|
||||
---
|
||||
|
||||
### Auto-generating Table of Contents
|
||||
|
||||
By default, all pages with children will automatically append a Table of Contents which lists the child pages after the parent page's content. To disable this auto Table of Contents, set `has_toc: false` in the parent page's YAML front matter.
|
||||
|
Reference in New Issue
Block a user