mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Make TOC on parent pages optional
This commit is contained in:
@@ -92,7 +92,6 @@ On the parent pages, add 2 YAML front matter variables:
|
||||
|
||||
#### Example
|
||||
{: .no_toc }
|
||||
|
||||
```yaml
|
||||
---
|
||||
layout: default
|
||||
@@ -121,6 +120,23 @@ nav_order: 2
|
||||
---
|
||||
```
|
||||
|
||||
### 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 it to false on the parent page's YAML front matter.
|
||||
|
||||
#### Example
|
||||
{: .no_toc }
|
||||
```yaml
|
||||
---
|
||||
layout: default
|
||||
title: UI Components
|
||||
nav_order: 2
|
||||
has_children: true
|
||||
has_toc: false
|
||||
permalink: /docs/ui-components
|
||||
---
|
||||
```
|
||||
|
||||
The Buttons page appears a child of UI Components and appears second in the UI Components section.
|
||||
|
||||
### Children with children
|
||||
|
Reference in New Issue
Block a user