How to list all posts by an author without taxonomy or related content

This is follow-up question to How to list images/resources from multiple related pages?

In that case, I needed to list images/resources for all the contributors of an article where the article contributors are stored in frontmatter as an array of contributor UUIDs.

Now I need to do the inverse–list all the articles by an individual contributor. Something like this is not working:

{{ $p := where (where .Site.Pages "Section" "articles") "Params.contributors" "intersect" .Params.uuid }}
 {{ range $p }}
 {{ $image := .Resources.GetMatch .Params.article_featured_image }}
 <p>{{.Title}}</p>
 <img src="{{ $image.RelPermalink }}">
 {{end}}

I guess this isn’t working because the uuid for each contributor is not stored as an array? How an I make this work?

Help appreciated!

"intersect" (slice .Params.uuid)
1 Like

Thank you! Again, you have saved the day, @jmooring

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.