Gotcha. Thanks for the update. Frankly, it was my bad for being lazy and not reading the preceding comments
So here is what I would recommend:
- I assume you have
author = "authors"
in yourconfig.toml
under[taxonomies]
. - I assume, for example, that if you have an author named
Ryan Watters
, you have a content file for said author atcontent/authors/ryan-watters/_index.md
. - I assume that when you add an author to a content file, you do so using
authors = ["Ryan Watters", "John Doe"]
, etc…
So here is what you need for something like layouts/_default/single.html
:
<!--Somewhere in layouts/_default/single.html-->
{{ with .Params.authors }}
{{ range $ind,$val := . }}
{{$author := $val | urlize }}
{{- with $.Site.GetPage "taxonomyTerm" "authors" $author}}
<p>Name = {{ .Params.name }} </p>
<p>Bio = {{ .Params.bio }}</p>
<p>Photo = {{.Params.photo}}</p>
<p>Here is the content from this author's _index.md file:</p>
{{.Content}}
{{ end -}}
{{ end }}
{{ end }}
Obviously you can use whatever elements you want…