I am creating a blog in the current version of Middleman and I want to be able to create a list of all the authors on the blog to display on a sidebar (just as I would a tag, that would then link to a page that listed all authors posts (sort of like a author archive?)
So far I have a "author" frontmatter block at the top of each page:
---
author: Joe Bloggs
---
I have thought of doing this using front matter but frontmatter only seems to allow page specific variables, eg:
---
layout: "blog"
authors:
- author 1
- author 2
- author 3
---
<ul>
<% current_page.data.authors.each do |f| %>
<li><%= f %></li>
<% end %>
</ul>
and not creating the archive page.
I thought I could do this similarly to how a tag list is displayed:
<ul>
<% blog.tags.each do |tag, articles| %>
<li><%= link_to tag, tag_path(tag) %></a></li>
<% end %>
</ul>
but so far no luck. I have done google searches but no specific were found.
Can anyone suggest a possible code solution?