Hugo Narrow 作者信息位于首页,示例配置中 avatar 文件放置在 ~/static/ 目录,icon 值使用 ~/assets/icons/ 目录下文件名。
params.yaml
1author:
2 name: "Hugo Narrow"
3 title: "A Clean and Minimal Hugo Theme"
4 description: "Focused on content and user experience."
5 avatar: "/images/avatar.svg"
6 social:
7 - name: "GitHub"
8 url: "https://github.com/username"
9 icon: "github"
10 - name: "Twitter"
11 url: "https://twitter.com/username"
12 icon: "twitter"
13 - name: "Email"
14 url: "mailto:hello@example.com"
15 icon: "email"多语言
如果你的站点支持多种语言,在首页页面包的索引文件 ~/content/_index.md 和翻译文件 ~/content/_index.zh-cn.md 的头信息中设置参数,优先使用页面配置,否则会使用站点配置文件 params.yaml 中的配置。
content/_index.zh-cn.md
1author:
2 name: "Hugo Narrow"
3 title: "A Clean and Minimal Hugo Theme"
4 description: "Focused on content and user experience."
5 avatar: "/images/avatar.svg"
6 social:
7 - name: "GitHub"
8 url: "https://github.com/username"
9 icon: "github"
10 - name: "Twitter"
11 url: "https://twitter.com/username"
12 icon: "twitter"
13 - name: "Email"
14 url: "mailto:hello@example.com"
15 icon: "email"