Skip to content

Commit 5ae4f03

Browse files
committed
Fix blog post authors
1 parent 8168c8e commit 5ae4f03

File tree

6 files changed

+35
-13
lines changed

6 files changed

+35
-13
lines changed

docs/_data/authors.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Map of short name to more information. `name` will be used but if you don't
22
# want to use your real name, just use whatever. If url is included, your name
33
# will be a link to the provided url.
4-
billandjing:
5-
name: Bill Fisher and Jing Chen
64
chenglou:
75
name: Cheng Lou
86
url: https://twitter.com/_chenglou
@@ -18,8 +16,12 @@ jaredly:
1816
jgebhardt:
1917
name: Jonas Gebhardt
2018
url: https://twitter.com/jonasgebhardt
21-
jimandsebastian:
22-
name: Jim Sproch and Sebastian Markbåge
19+
jimfb:
20+
name: Jim Sproch
21+
url: http://www.jimsproch.com
22+
jingc:
23+
name: Jing Chen
24+
url: https://twitter.com/jingc
2325
josephsavona:
2426
name: Joseph Savona
2527
url: https://twitter.com/en_JS

docs/_includes/blog_post.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ <h1>
1111
<p class="meta">
1212
{{ page.date | date: "%B %e, %Y" }}
1313
by
14-
{% if page.author.url %}
15-
<a href="{{page.author.url}}">{{ page.author.name }}</a>
16-
{% else %}
17-
{{ page.author.name }}
18-
{% endif %}
14+
{% for author in page.authors %}
15+
{% if author.url %}
16+
<a href="{{author.url}}">{{ author.name }}</a>
17+
{% else %}
18+
{{ author.name }}
19+
{% endif %}
20+
{% if forloop.last == false %} and {% endif %}
21+
{% endfor %}
1922
</p>
2023

2124
<hr>

docs/_plugins/authors.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ module Authors
77
class Generator < Jekyll::Generator
88
def generate(site)
99
site.posts.each do |post|
10-
post.data['author'] = site.data['authors'][post['author']]
10+
authors = []
11+
if post['author'].kind_of?(Array)
12+
for author in post['author']
13+
authors.push(site.data['authors'][author])
14+
end
15+
else
16+
authors.push(site.data['authors'][post['author']])
17+
end
18+
post.data['authors'] = authors
1119
end
1220
end
1321
end

docs/_posts/2014-05-06-flux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Flux: An Application Architecture for React"
3-
author: fisherwebdevandjing
3+
author: [fisherwebdev, jingc]
44
---
55

66
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:

docs/_posts/2015-10-01-react-render-and-top-level-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "ReactDOM.render and the Top Level React API"
3-
author: jimandsebastian
3+
author: ["jimfb", "sebmarkbage"]
44
---
55

66

docs/blog/all.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
<div class="inner-content">
1010
<h1>All Posts</h1>
1111
{% for page in site.posts %}
12-
<p><strong><a href="/react{{ page.url }}">{{ page.title }}</a></strong> on {{ page.date | date: "%B %e, %Y" }} by {{ page.author.name }}</p>
12+
<p><strong><a href="/react{{ page.url }}">{{ page.title }}</a></strong> on {{ page.date | date: "%B %e, %Y" }} by
13+
{% for author in page.authors %}
14+
{% if author.url %}
15+
<a href="{{author.url}}">{{ author.name }}</a>
16+
{% else %}
17+
{{ author.name }}
18+
{% endif %}
19+
{% if forloop.last == false %} and {% endif %}
20+
{% endfor %}
21+
</p>
1322
{% endfor %}
1423
</div>
1524
</section>

0 commit comments

Comments
 (0)