diff --git a/source/_includes/macros.html.twig b/source/_includes/macros.html.twig index b532d0987..3723faa75 100644 --- a/source/_includes/macros.html.twig +++ b/source/_includes/macros.html.twig @@ -1,3 +1,8 @@ -{% macro yearsExperience() %} - {{- today|date('Y') - 2007 -}} +{# Return a rounded count of daily emails I've sent (e.g. the actual number is 449, return 440+). #} +{% macro dailiesCount(dailies) %} + {{- dailies|length|round(-1, 'floor') -}}+ +{% endmacro %} + +{% macro yearsExperience() %} + {{- today|date('Y') - 2007 -}} {% endmacro %} diff --git a/source/_pages/archive.html b/source/_pages/archive.html index 9e845de87..58693350e 100644 --- a/source/_pages/archive.html +++ b/source/_pages/archive.html @@ -9,7 +9,11 @@ use: --- {% block content %} -
+ {% import 'macros' as macros %} + +

This is an archive of the {{ macros.dailiesCount(data.daily_emails) }} email messages I have sent to my daily mailing list since the 12th of August, 2022. Enjoy!

+ +
    {% for email in page.pagination.items %}