Re-add and use custom Twig extensions

This commit is contained in:
Oliver Davies 2025-05-04 17:48:56 +01:00
parent 26bffdb58d
commit 275103e149
14 changed files with 1841 additions and 26 deletions

View file

@ -4,10 +4,7 @@ title: Presentations
use: [presentations]
---
{% set today = 'today'|date('U') %}
{% set presentation_count = data.presentations|reduce((count, presentation) => count + (presentation.events|filter(e => e.date|date('U') < today)|length), 0) %}
<p>Since September 2012, I have given {{ presentation_count }} public talks and workshops at various conferences and meetups, in-person and remotely, on topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.</p>
<p>Since September 2012, I have given {{ get_presentation_count(data.presentations) }} public talks and workshops at various conferences and meetups, in-person and remotely, on topics including PHP, Drupal, automated testing, Git, CSS, and systems administration.</p>
{% for presentation in data.presentations|sort((a, b) => a.events|last.date|date('U') > b.events|last.date|date('U') ? -1 : 1) %}
<article>