博文作者

博客模块默认支持多作者。

站点配置

请确保已于 taxonomies 中追加了 authors,以启用多作者功能。

hugo.toml

1[taxonomies]
2  authors = 'authors'

hugo.yaml

1taxonomies:
2  authors: authors

hugo.json

1{
2   "taxonomies": {
3      "authors": "authors"
4   }
5}

注明作者

然后于内容前言中注明作者。

1authors = ['HB', 'Hugo']
1authors:
2- HB
3- Hugo
1{
2   "authors": [
3      "HB",
4      "Hugo"
5   ]
6}

现在该页面由 HBHugo 合著,将会于页面中显示。

Authors Parameters

详细地介绍作者。

ParameterTypeDescription
titlestring作者名称。
descriptionstring作者描述。
email_hashstring邮箱的 md5 哈希值,用于生成 Gravatar 头像,也可以使用下面的 images
imagesarray第一张图片将作为头像。
socialsobject另请参阅社交链接

Authors Example

HB 为例。

content/authors/hb/_index.md
1description = 'Contributors of HB Framework code and documentation.'
2images = ['https://avatars.githubusercontent.com/u/127904984?s=200&v=4']
3title = 'HB Framework Authors'
4[socials]
5  _color = false
6  github = 'hbstack'
1description: Contributors of HB Framework code and documentation.
2images:
3- https://avatars.githubusercontent.com/u/127904984?s=200&v=4
4socials:
5  _color: false
6  github: hbstack
7title: HB Framework Authors
 1{
 2   "description": "Contributors of HB Framework code and documentation.",
 3   "images": [
 4      "https://avatars.githubusercontent.com/u/127904984?s=200\u0026v=4"
 5   ],
 6   "socials": {
 7      "_color": false,
 8      "github": "hbstack"
 9   },
10   "title": "HB Framework Authors"
11}

socials._color 设置为 false 以禁用彩色图标。