blob: cc2eda99ee60d19d3d0f943d74f77c3e1a791de0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
+++
title = "Menu"
description = ""
weight = 20
+++
Docport's Menu displays your content structure on left.
* the 2 dashed rectangles are 2 position where you can inject custom content, see bellow
* menu entries are controled by each content page frontmatter options
![header](screenshot.png?classes=border,shadow)
## Menu entry labels
Each of your content/ folder sections are an entry, their `_index.md` file is used to get information about how to render each one, thanks to frontmatter.
{{%notice warning%}}
Reminder : [subpages]({{%relref "content-and-customization/00-adding-content#subpages"%}}) are not rendered in this menu
{{%/notice%}}
Bellow are all frontmatters options used to render a menu entry.\
Example from the current "Getting start" section.
```toml
+++
# Menu label
title = "Getting started"
# Hide this page from menu
hidden = false
# Prefix menu label with a text, an html...
pre = ""
# Suffix menu label with a text, an html...
post = "👋"
# Display this before the menu entry
head = "<hr/>"
# Keep this menu opened by default
alwaysopen = true
+++
```
## Add content before menu entries
(red dashed rectangle in the screenshot)
Create a `_index.md` page in `_layout/_sidepage-before` folder.
```bash
content/
└── _layout
└── sidepage-before
├── _index.md
└── _index.fr.md
```
{{%alert info%}}**Remember :** You can put a full HTML content in your .md files{{%/alert%}}
{{%alert info%}}**Tip :** You can remove search box if you need to [see more here]({{%relref "search"%}})
{{%/alert%}}
## Add content after menu entries
(blue dashed rectangle in the screenshot)
Create a `_index.md` page in `_layout/_sidepage-after` folder.
```bash
content/
└── _layout
└── sidepage-after
├── _index.md
└── _index.fr.md
```
## Hide site menu
Set `hide_nav=true` in your page's frontmatter, see [an example here]({{%relref "examples/page without sidebar and toc"%}})
|