Skip to content

Commit 83f5cc6

Browse files
committed
post author
1 parent dfbf846 commit 83f5cc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/_layouts/post.njk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ bodyClass: single single-post
2626
<div class="post__meta">
2727
<p>
2828
<time class="post__date dt-published" itemprop="datePublished" datetime="{{ page.date | dateToISO }}">{{ page.date | readableDate('dd MMM yyyy', locale) }}</time>
29+
{% if author %}
30+
<span aria-label="author">&middot;</span> <span class="post__author p-author">by <span itemprop="author">{{ author }}</span></span>
31+
{% endif %}
2932
{% if tags %}
3033
<span aria-label="in category">&middot;</span> <span class="post__tags p-category">{{ tags | join(', ') }}</span>
3134
{% endif %}
@@ -45,7 +48,7 @@ bodyClass: single single-post
4548
</div>
4649

4750
<p class="post__footer-info">
48-
{% if tags %}Published in [{{ tags | join(', ') }}] &middot; {% endif %}{{ page.date | readableDate('dd LLL yyyy', locale) }} <br/>
51+
{% if tags %}Published in {{ tags | join(', ') }} &middot; {% endif %}{{ page.date | readableDate('dd LLL yyyy', locale) }} <br/>
4952
<a href="{{ metadata.repo }}/tree/master/{{ page.inputPath }}" title="suggest a change to this post by submitting a PR">edit this post</a>
5053
</p>
5154

0 commit comments

Comments
 (0)