mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #5178 from jimfb/multiple-authors
Fix blog post authors
(cherry picked from commit ccfc2d8049)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user