Skip to content

Commit

Permalink
Add author info from data file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ainali committed Sep 13, 2022
1 parent 9deef87 commit 97951fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/metadata.liquid
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% capture currentDate %}{{ site.time | date: '%F' }}{% endcapture %}
{% capture date %}{{ page.expires | date: '%F' }}{% endcapture %}

{% assign author = site.data.authors[page.author] %}
{% if page.type %}
<h2 id="page-metadata">This {{ page.type | downcase }}</h2>
{% endif %}
Expand All @@ -10,7 +10,7 @@
{% if page.date %}<tr><td>Date:</td><td>{{ page.date | date: '%-d %B %Y' }}</td></tr>{% endif %}
{% if page.explains %}<tr><td>Explains:</td><td class="explains">{{page.explains}}</td></tr>{% endif %}
{% if page.audience %}<tr><td>Audience:</td><td class="audience">{{page.audience}}</td></tr>{% endif %}
{% if page.author %}<tr><td>Author:</td><td class="author">{{page.author}}</td></tr>{% endif %}
{% if page.author %}<tr><td>Author:</td><td class="author">{{author.name}}</td></tr>{% endif %}
{% if page.expires %}<tr class="{% if date < currentDate %}expired{% else %}not-expired{% endif %}"><td>Expires:</td><td class="expires">{{ page.expires | date: "%-d %B %Y" }} ({{page.expires}})</ttd></td>{% endif %}
</table>
{% endif %}
{% endif %}

0 comments on commit 97951fa

Please sign in to comment.