Hugo Narrow 支持三处导航菜单:
- 顶部菜单(main)
- 页脚菜单(footer)
- 社交链接菜单(social)
其中 icon 为标题前图标,使用 SVG 格式,放置在 hugo-narrow/assets/icons/ 目录下,使用文件名作为参数值引用。
TIP
可以在 Iconify Design 找到更多优质图标。
支持通过创建语言后缀文件为不同语言创建菜单:menus.zh-hans.yaml。
yaml
main:
- name: Posts
pageRef: /posts
weight: 10
params:
icon: posts
- name: Archives
pageRef: /archives
weight: 20
params:
icon: archive
# Example: parent item with dropdown submenu children
- name: More
weight: 30
params:
icon: layers
- name: Categories
weight: 1
pageRef: /categories
parent: More
params:
icon: categories
- name: Tags
weight: 2
pageRef: /tags
parent: More
params:
icon: tags
- name: Series
weight: 3
pageRef: /series
parent: More
params:
icon: bookmark
- name: Projects
weight: 4
pageRef: /projects
parent: More
params:
icon: projects
# footer menu
footer:
- name: Timeline
pageRef: /timeline
weight: 10
params:
icon: chart
- name: About
pageRef: /about
weight: 20
params:
icon: about
- name: Resume
pageRef: /resume
weight: 25
params:
icon: file-text
- name: RSS Feed
url: /index.xml
weight: 30
params:
icon: rss
# footer social link
social:
- name: GitHub
url: https://github.com/username
weight: 10
params:
icon: github
- name: Twitter
url: https://twitter.com/username
weight: 20
params:
icon: twitter
- name: LinkedIn
url: https://linkedin.com/in/username
weight: 30
params:
icon: linkedin
- name: Email
url: mailto:your.email@example.com
weight: 40
params:
icon: email1
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
86
87
88
89
90
91
92
93
94
95
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
86
87
88
89
90
91
92
93
94
95