Browse Source

Add example for Sidebar menus

Dinesh 5 years ago
parent
commit
6190b663b6
1 changed files with 24 additions and 1 deletions
  1. 24
    1
      README.md

+ 24
- 1
README.md View File

@@ -52,7 +52,30 @@ Hyde includes some customizable options, typically applied via classes on the `<
52 52
 
53 53
 ### Sidebar menu
54 54
 
55
-Create a list of nav links in the sidebar by assigning "menu=main" in the front matter.
55
+Create a list of nav links in the sidebar by assigning "menu=main" in the front matter, like so:
56
+
57
+**TOML**
58
+```toml
59
+theme = "hyde"
60
+
61
+[Menus]
62
+  main = [
63
+      {Name = "Github", URL = "https://github.com/username/"},
64
+      {Name = "LinkedIn", URL = "https://www.linkedin.com/in/username/"}
65
+  ]
66
+```
67
+
68
+**YAML**
69
+```yaml
70
+theme: "hyde"
71
+
72
+Menus:
73
+  main:
74
+    - Name: "Github"
75
+      URL: "https://github.com/username/"
76
+    - Name: "LinkedIn"
77
+      URL: "https://www.linkedin.com/in/username/"
78
+```
56 79
 
57 80
 
58 81
 ### Sticky sidebar content