mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-16 08:02:24 -06:00
Merge pull request #181 from m3nu/master
Recommend using index.md as parent page for sections
This commit is contained in:
commit
34eaf8b16d
@ -67,7 +67,7 @@ Sometimes you will want to create a page with many children (a section). First,
|
|||||||
|
|
|
|
||||||
|-- docs
|
|-- docs
|
||||||
| |-- ui-components
|
| |-- ui-components
|
||||||
| | |-- ui-components.md (parent page)
|
| | |-- index.md (parent page)
|
||||||
| | |-- buttons.md
|
| | |-- buttons.md
|
||||||
| | |-- code.md
|
| | |-- code.md
|
||||||
| | |-- labels.md
|
| | |-- labels.md
|
||||||
@ -75,7 +75,7 @@ Sometimes you will want to create a page with many children (a section). First,
|
|||||||
| | +-- typography.md
|
| | +-- typography.md
|
||||||
| |
|
| |
|
||||||
| |-- utilities
|
| |-- utilities
|
||||||
| | |-- utilities.md (parent page)
|
| | |-- index.md (parent page)
|
||||||
| | |-- color.md
|
| | |-- color.md
|
||||||
| | |-- layout.md
|
| | |-- layout.md
|
||||||
| | |-- responsive-modifiers.md
|
| | |-- responsive-modifiers.md
|
||||||
@ -88,9 +88,8 @@ Sometimes you will want to create a page with many children (a section). First,
|
|||||||
+-- ..
|
+-- ..
|
||||||
```
|
```
|
||||||
|
|
||||||
On the parent pages, add 2 YAML front matter parameters:
|
On the parent pages, add this YAML front matter parameter:
|
||||||
- `has_children: true` (tells us that this is a parent page)
|
- `has_children: true` (tells us that this is a parent page)
|
||||||
- `permalink:` set this to the site directory that contains the child pages
|
|
||||||
|
|
||||||
#### Example
|
#### Example
|
||||||
{: .no_toc }
|
{: .no_toc }
|
||||||
@ -101,7 +100,6 @@ layout: default
|
|||||||
title: UI Components
|
title: UI Components
|
||||||
nav_order: 2
|
nav_order: 2
|
||||||
has_children: true
|
has_children: true
|
||||||
permalink: /docs/ui-components
|
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -140,7 +138,6 @@ title: UI Components
|
|||||||
nav_order: 2
|
nav_order: 2
|
||||||
has_children: true
|
has_children: true
|
||||||
has_toc: false
|
has_toc: false
|
||||||
permalink: /docs/ui-components
|
|
||||||
---
|
---
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user