博客模块默认支持多作者。
请确保已于 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}
现在该页面由 HB 和 Hugo 合著,将会于页面中显示。
详细地介绍作者。
| Parameter | Type | Description | 
|---|---|---|
title | string | 作者名称。 | 
description | string | 作者描述。 | 
email_hash | string | 邮箱的 md5 哈希值,用于生成 Gravatar 头像,也可以使用下面的 images。 | 
images | array | 第一张图片将作为头像。 | 
socials | object | 另请参阅社交链接。 | 
以 HB 为例。
1description = 'HB (Hugo Bootstrap) Framework codes and documentations contributors'
2images = ['https://avatars.githubusercontent.com/u/127904984?s=200&v=4']
3title = 'HB Framework Authors'
4[socials]
5  _color = false
6  github = 'hbstack'
1description: HB (Hugo Bootstrap) Framework codes and documentations contributors
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": "HB (Hugo Bootstrap) Framework codes and documentations contributors",
 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以禁用彩色图标。