Also for multiple authors users can define them in a project’s config like so:
[author]
authors = [
{name = "Alex", location = "GR"},
{name = "John", location = "US"}
]
Then call the authors’ list from the template like so:
{{ range site.Author.authors }}
<p>{{ .name }} in {{ .location }}</p>
{{ end }}
Furthermore conditional logic can be used to selectively render a specific author’s details from the project config in a content file that has been authored by them.
For example with a file that has the following parameter: author = "Alex"
One can enter the following in the single page template:
{{ range site.Author.authors }}
{{ if eq .name $.Params.author }}{{ .name }} in {{ .location }}{{ end }}
{{ end }}