From 5ae4f035c70f4debeeb87307edaad0beda0627b2 Mon Sep 17 00:00:00 2001 From: Jim Date: Wed, 14 Oct 2015 17:32:57 -0700 Subject: [PATCH] Fix blog post authors --- docs/_data/authors.yml | 10 ++++++---- docs/_includes/blog_post.html | 13 ++++++++----- docs/_plugins/authors.rb | 10 +++++++++- docs/_posts/2014-05-06-flux.md | 2 +- .../2015-10-01-react-render-and-top-level-api.md | 2 +- docs/blog/all.html | 11 ++++++++++- 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/docs/_data/authors.yml b/docs/_data/authors.yml index e24567d685..113e146409 100644 --- a/docs/_data/authors.yml +++ b/docs/_data/authors.yml @@ -1,8 +1,6 @@ # Map of short name to more information. `name` will be used but if you don't # want to use your real name, just use whatever. If url is included, your name # will be a link to the provided url. -billandjing: - name: Bill Fisher and Jing Chen chenglou: name: Cheng Lou url: https://twitter.com/_chenglou @@ -18,8 +16,12 @@ jaredly: jgebhardt: name: Jonas Gebhardt url: https://twitter.com/jonasgebhardt -jimandsebastian: - name: Jim Sproch and Sebastian Markbåge +jimfb: + name: Jim Sproch + url: http://www.jimsproch.com +jingc: + name: Jing Chen + url: https://twitter.com/jingc josephsavona: name: Joseph Savona url: https://twitter.com/en_JS diff --git a/docs/_includes/blog_post.html b/docs/_includes/blog_post.html index a6978d12f5..894299c8f7 100644 --- a/docs/_includes/blog_post.html +++ b/docs/_includes/blog_post.html @@ -11,11 +11,14 @@

{{ page.date | date: "%B %e, %Y" }} by - {% if page.author.url %} - {{ page.author.name }} - {% else %} - {{ page.author.name }} - {% endif %} + {% for author in page.authors %} + {% if author.url %} + {{ author.name }} + {% else %} + {{ author.name }} + {% endif %} + {% if forloop.last == false %} and {% endif %} + {% endfor %}


diff --git a/docs/_plugins/authors.rb b/docs/_plugins/authors.rb index 9630e1f01a..e3ce378ce9 100644 --- a/docs/_plugins/authors.rb +++ b/docs/_plugins/authors.rb @@ -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 diff --git a/docs/_posts/2014-05-06-flux.md b/docs/_posts/2014-05-06-flux.md index 329082011b..d3c7b11262 100644 --- a/docs/_posts/2014-05-06-flux.md +++ b/docs/_posts/2014-05-06-flux.md @@ -1,6 +1,6 @@ --- title: "Flux: An Application Architecture for React" -author: fisherwebdevandjing +author: [fisherwebdev, jingc] --- We recently spoke at one of f8's breakout session about Flux, a data flow architecture that works well with React. Check out the video here: diff --git a/docs/_posts/2015-10-01-react-render-and-top-level-api.md b/docs/_posts/2015-10-01-react-render-and-top-level-api.md index 1811f1b091..4d7cdc22cc 100644 --- a/docs/_posts/2015-10-01-react-render-and-top-level-api.md +++ b/docs/_posts/2015-10-01-react-render-and-top-level-api.md @@ -1,6 +1,6 @@ --- title: "ReactDOM.render and the Top Level React API" -author: jimandsebastian +author: ["jimfb", "sebmarkbage"] --- diff --git a/docs/blog/all.html b/docs/blog/all.html index ecb7cd7191..4a85f4b350 100644 --- a/docs/blog/all.html +++ b/docs/blog/all.html @@ -9,7 +9,16 @@ id: all-posts

All Posts

{% for page in site.posts %} -

{{ page.title }} on {{ page.date | date: "%B %e, %Y" }} by {{ page.author.name }}

+

{{ page.title }} on {{ page.date | date: "%B %e, %Y" }} by + {% for author in page.authors %} + {% if author.url %} + {{ author.name }} + {% else %} + {{ author.name }} + {% endif %} + {% if forloop.last == false %} and {% endif %} + {% endfor %} +

{% endfor %}