From 84a6b13a1c0ad858497d9b479e4aa8f7ebf5b724 Mon Sep 17 00:00:00 2001 From: Damien Dart Date: Mon, 24 Jun 2024 22:11:33 +0100 Subject: [PATCH] Update "index.atom.twig". --- src/yassg/notes/index.atom.twig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/yassg/notes/index.atom.twig b/src/yassg/notes/index.atom.twig index 376d815..1f7ff26 100644 --- a/src/yassg/notes/index.atom.twig +++ b/src/yassg/notes/index.atom.twig @@ -4,19 +4,22 @@ This file is distributed under the MIT licence. For more information, please refer to the accompanying "LICENCE" file. #} + {% set items = collections.notes | sort((a, b) => b.metadata.git.createdAt <=> a.metadata.git.createdAt) | slice(0, 11) %} + {% set lastUpdated = items | map(n => n.metadata.git.updatedAt) | sort | first %} + Damien Dart’s Notes (www.robotinaponcho.net) - {{ 'now' | date('c') }} + {{ lastUpdated | date('c') }} {{ authorEmail }} {{ urlBase }} {{ author | smartypants }} {{ urlBase }}notes/index.atom - {% for note in collections.notes | sort((a, b) => b.metadata.git.createdAt <=> a.metadata.git.createdAt) | slice(0, 11) %} + {% for note in items %} {{ urlBase }}{{ note.metadata.slug }}