Skip to content

Commit 7f5d5f7

Browse files
committed
Allow multiple post authors
1 parent 9d1fc67 commit 7f5d5f7

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

_layouts/post.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ <h1>{{ page.title }}</h1>
1111
{% if page.subtitle %}
1212
<h2>{{ page.subtitle }}</h2>
1313
{% endif %}
14-
<div class="byline">{{ page.date | date: "%B %d, %Y" }}{% if page.author %} &middot; by {{ page.author}}{% endif %} &middot; in {% for category in page.categories %}
14+
<div class="byline">{{ page.date | date: "%B %d, %Y" }}{% if page.author %} &middot; by {{ page.author }}{% endif %}{% if page.authors %} &middot; by {{ page.authors | join: ", " }}{% endif %} &middot; in {% for category in page.categories %}
1515
{% if category == "Elixir in Production" %}
1616
<a class="category" href="/cases.html">{{ category }}</a>
1717
{% else %}

atom.xml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ elixir_url: http://elixir-lang.org
1616
<title>{{ post.title }}</title>
1717
<link href="{{ page.elixir_url }}{{ post.url }}"/>
1818
{% if post.author %}
19-
<author>
20-
<name>{{ post.author }}</name>
21-
</author>
19+
<author>
20+
<name>{{ post.author }}</name>
21+
</author>
2222
{% endif %}
23+
{% for author in post.authors %}
24+
<author>
25+
<name>{{ author }}</name>
26+
</author>
27+
{% endfor %}
2328
<updated>{{ post.date | date_to_xmlschema }}</updated>
2429
<id>{{ post.id }}</id>
2530
<content type="html">{{ post.content | xml_escape }}</content>

blog/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="hentry post">
1010
<div class="sticky-header">
1111
<h2 class="entry-title"><a class="spec" href="{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a></h2>
12-
<div class="byline">{{ post.date | date: "%B %d, %Y" }}{% if post.author %} · by {{ post.author}}{% endif %} . in {% for category in post.categories %}<a href="/blog/categories.html#{{category}}" class="category">{{ category }}</a>{% endfor %}</div>
12+
<div class="byline">{{ post.date | date: "%B %d, %Y" }}{% if post.author %} · by {{ post.author }}{% endif %}{% if post.authors %} · by {{ post.authors | join: ", " }}{% endif %} . in {% for category in post.categories %}<a href="/blog/categories.html#{{category}}" class="category">{{ category }}</a>{% endfor %}</div>
1313
</div><!-- .sticky-header -->
1414

1515
<div class="entry-summary">

0 commit comments

Comments
 (0)