Add default author if none specified in post

This commit is contained in:
N-Upchurch 2023-08-21 19:21:48 -05:00
parent d3b1b3a020
commit 9d23167be7

View File

@ -5,13 +5,15 @@ layout: layouts/base.njk
{%- css %}{% include "public/css/code.css" %}{% endcss %}
<h1>{{ title }}</h1>
<ul class="post-metadata">
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
{%- endfor %}
</ul>
<div class="post-metadata">
<p>{% if author.name %}{{ author.name }}, {% else %}{{ metadata.author.name }}, {% endif %}<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></p>
<ul>
{%- for tag in tags | filterTagList %}
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li><a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a></li>
{%- endfor %}
</ul>
</div>
{{ content | safe }}