Add last updated date and make publish&change dates show only when necessary

This commit is contained in:
Jonas Tobias Hopusch 2021-06-29 22:52:39 +02:00
parent f19fc2fd0a
commit 827df4e2da
Failed to generate hash of commit

View file

@ -1,7 +1,12 @@
{% extends "base.html" %} {% block content %} {% extends "base.html" %} {% block content %}
<h3>{{ page.title }}</h3> <h3>{{ page.title }}</h3>
<article> <article>
{% if page.date and page.date is defined %}
<p>Published on: {{ page.date }}</p> <p>Published on: {{ page.date }}</p>
{% endif %}
{% if page.updated and page.updated != page.date %}
<p>Last updated on: {{ page.updated }}</p>
{% endif %}
<div> <div>
{{ page.content | safe }} {{ page.content | safe }}
</div> </div>