Merge pull request #5178 from jimfb/multiple-authors

Fix blog post authors
(cherry picked from commit ccfc2d8049)
This commit is contained in:
Paul O’Shannessy
2015-10-19 10:30:14 -07:00
parent 1e175d0858
commit bed6aefc46
6 changed files with 35 additions and 13 deletions
+9 -1
View File
@@ -7,7 +7,15 @@ module Authors
class Generator < Jekyll::Generator
def generate(site)
site.posts.each do |post|
post.data['author'] = site.data['authors'][post['author']]
authors = []
if post['author'].kind_of?(Array)
for author in post['author']
authors.push(site.data['authors'][author])
end
else
authors.push(site.data['authors'][post['author']])
end
post.data['authors'] = authors
end
end
end