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"
点击展开查看更多

版权声明

作者: Hugo Narrow

链接: https://hugo-narrow-docs.vercel.app/zh-cn/docs/%E4%BD%9C%E8%80%85/

许可证: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

开始搜索

输入关键词搜索文章内容

↑↓
ESC
⌘K 快捷键