Reformatting

This commit is contained in:
2024-11-04 23:23:20 +00:00
parent bdcc7cea6a
commit 232599a7f8
18 changed files with 140 additions and 100 deletions

View File

@@ -7,22 +7,35 @@ layout: layouts/base.njk
<h1>{{ title }}</h1>
<ul class="post-metadata">
<li><time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time></li>
<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>{%- if not loop.last %}, {% endif %}</li>
{%- set tagUrl %}/tags/{{ tag | slugify }}/{% endset %}
<li>
<a href="{{ tagUrl }}" class="post-tag">{{ tag }}</a>
{%- if not loop.last %}, {% endif %}
</li>
{%- endfor %}
</ul>
{{ content | safe }}
{%- if collections.posts %}
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
{%- set nextPost = collections.posts | getNextCollectionItem %}
{%- if nextPost or previousPost %}
<ul class="links-nextprev">
{%- if previousPost %}<li class="links-nextprev-prev">← Previous<br> <a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a></li>{% endif %}
{%- if nextPost %}<li class="links-nextprev-next">Next →<br><a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a></li>{% endif %}
</ul>
{%- endif %}
{%- endif %}
{%- set previousPost = collections.posts | getPreviousCollectionItem %}
{%- set nextPost = collections.posts | getNextCollectionItem %}
{%- if nextPost or previousPost %}
<ul class="links-nextprev">
{%- if previousPost %}
<li class="links-nextprev-prev">← Previous<br>
<a href="{{ previousPost.url }}">{{ previousPost.data.title }}</a>
</li>
{% endif %}
{%- if nextPost %}
<li class="links-nextprev-next">Next →<br>
<a href="{{ nextPost.url }}">{{ nextPost.data.title }}</a>
</li>
{% endif %}
</ul>
{%- endif %}
{%- endif %}