Skip to content

Commit

Permalink
adding update date to template
Browse files Browse the repository at this point in the history
  • Loading branch information
livexia committed Mar 18, 2024
1 parent 7c76952 commit 306e433
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions templates/macros.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{% macro post_metadata(page) %}
<div class="page-metadata">
{{ page.taxonomies["tags"] }}
{{ page.date | date(format="%B %e, %Y") }}
Posted on {{ page.date | date(format="%b %e, %Y") }}
{% if page.updated %}
&middot;
Updated on {{ page.updated | date(format="%b %e, %Y") }}
{% endif %}
&middot; {{ page.reading_time }} minute read
</div>
{% endmacro post_metadata %}
Expand All @@ -13,7 +17,7 @@
<li>
<span class="page-metadata">
{{ page.taxonomies["tags"] }}
{{ page.date | date(format="%B %e, %Y") }}
{{ page.date | date(format="%b %e, %Y") }}
</span>
<h2 class="title"><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
</li>
Expand All @@ -27,7 +31,7 @@ <h2 class="title"><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
<li>
<span class="page-metadata">
{{ page.taxonomies["tags"] }}
{{ page.date | date(format="%B %e, %Y") }}
{{ page.date | date(format="%b %e, %Y") }}
</span>
<h2 class="title"><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
</li>
Expand All @@ -36,7 +40,7 @@ <h2 class="title"><a href="{{ page.permalink }}">{{ page.title }}</a></h2>
<div>
{% if paginator.previous %}
<a href = "{{ paginator.previous }}">Previous page</a>
{% endif%}
{% endif %}
{% if paginator.number_pagers > 1 %}
Page {{ paginator.current_index }}
{% endif %}
Expand Down

0 comments on commit 306e433

Please sign in to comment.