Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/balaramadurai/hugo-travelify-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBala Ramadurai <bala@balaramadurai.net>2018-05-03 04:58:48 +0300
committerBala Ramadurai <bala@balaramadurai.net>2018-05-03 04:58:48 +0300
commit8a7ef03c1048cc293612513b8050e5eb055dca38 (patch)
treed939ace27ae1b50fe659a0bcbce807135af094bd
parenta7855106ad43d5aa43ada90400056beca844c12b (diff)
Nested menus
- Gives an example of how to get nested menus
-rw-r--r--README.md21
1 files changed, 20 insertions, 1 deletions
diff --git a/README.md b/README.md
index 8696c60..759ffe3 100644
--- a/README.md
+++ b/README.md
@@ -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`: