Blog Authors

The blog module supports multiple authors by default.

Site Configuration

To enable the multiple authors, please make sure that the authors is present under the taxonomies.

hugo.toml

1[taxonomies]
2  authors = 'authors'

hugo.yaml

1taxonomies:
2  authors: authors

hugo.json

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

Note Authors

And then note the authors on content’s front matter.

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

Now the page was co-authored by HB and Hugo, and will be shown on the page.

Authors Parameters

Describe the authors in details.

ParameterTypeDescription
titlestringAuthor display name.
descriptionstringAuthor description.
email_hashstringThe md5 hash of email, used by Gravatar, you can use the images parameter below instead.
imagesarrayThe first image will be used as the avatar of authors.
socialsobjectThe social links.

Authors Example

Let’s take HB as an example.

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}

To disable the colorful icon by setting socials._color as false.

razonyang
Monday, July 15, 2024 Friday, March 31, 2023