diff options
author | Bala Ramadurai <bala@balaramadurai.net> | 2018-05-03 04:58:48 +0300 |
---|---|---|
committer | Bala Ramadurai <bala@balaramadurai.net> | 2018-05-03 04:58:48 +0300 |
commit | 8a7ef03c1048cc293612513b8050e5eb055dca38 (patch) | |
tree | d939ace27ae1b50fe659a0bcbce807135af094bd /README.md | |
parent | a7855106ad43d5aa43ada90400056beca844c12b (diff) |
Nested menus
- Gives an example of how to get nested menus
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -107,7 +107,7 @@ disable_comments = true +++
```
-### 4. Menu
+### 4. Menu & Nested Menus
The entries in the items menu can be customized. First, let us link a post that you've written. We can do this in the `frontmatter` of the post's content file by setting `menu` to `main`.
@@ -128,6 +128,25 @@ Further, we can add entries that don't link to posts. Back in the `config.toml` Define a label and enter the URL of the resource you want to link. With `before` you can decide whether the link should appear before **or** after all linked posts in the menu. Therefore, `Home` appears before the linked post.
+For nested menus, you can use the following format:
+
+```
+[[menu.main]]
+ name = "Contact2"
+ url = "/contact/"
+ parent = "Contact"
+
+[[menu.main]]
+ name = "Contact21"
+ url = "/contact/"
+ parent = "Contact2"
+
+[[menu.main]]
+ name = "Contact22"
+ url = "/contact/"
+ parent = "Contact2"
+```
+
### 5. Sidebars
To use the full width of the website you can disable the profile on the left and / or the widgets on the right for a single page in the `frontmatter`:
|