Multiple Authors Per Blog Post

Hey folks, I’m attempting to get custom_collections to play nice with a hash of authors in a blog post frontmatter. I’d like it behave like tags, but that’s not happening. Maybe I’m missing something.

In some_post.html.md.erb:

---
author: 
  - ben
  - jerry
---

In config.rb:

  blog.custom_collections = {
    author: {
      link: "blog/author/{author}.html",
      template: "blog/templates/author.html",
    },
  }

Anyone have any ideas?

This commit looks like the following could work:

collection :authors,   # or maybe :tags, not sure if this is a hardcoded collection type
  where: proc { |resource|
    resource.data.author
  },
  group_by: proc { |resource|
    if resource.data.author.is_a? String
      resource.data.author.split(',').map(&:strip)
    else
      resource.data.author
    end
  } 

But the commit is from 2014. The API might have changed, but I didn’t find anything more recent.