last_updated.html 541 B

1234567891011121314151617
  1. {# Check which version of Pelican user is using.
  2. If it is <=3.3 than modified is a string
  3. If it is >3.3 than modified is a datetime object
  4. #}
  5. {% if article.locale_modified and article.modified %}
  6. <h4>Last Updated</h4>
  7. {% set day = article.modified.strftime('%d')|int %}
  8. <time datetime="{{ article.modified.isoformat() }}">{{ article.modified.strftime('%b') }} {{ day }} {{- article.modified.strftime(', %Y') }}</time>
  9. {% elif article.modified %}
  10. <h4>Last Updated</h4>
  11. <div class="last-updated">{{ article.modified }}</div>
  12. {% endif %}