Skip to content

Commit

Permalink
Update "index.atom.twig".
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Jun 24, 2024
1 parent 6e349d8 commit 84a6b13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/yassg/notes/index.atom.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Damien Dart’s Notes (www.robotinaponcho.net)</title>
<link href="{{ urlBase }}notes/"/>
<link href="{{ urlBase }}notes/index.atom" rel="self"/>
<updated>{{ 'now' | date('c') }}</updated>
<updated>{{ lastUpdated | date('c') }}</updated>
<author>
<email>{{ authorEmail }}</email>
<uri>{{ urlBase }}</uri>
<name>{{ author | smartypants }}</name>
</author>
<id>{{ urlBase }}notes/index.atom</id>
{% for note in collections.notes | sort((a, b) => b.metadata.git.createdAt <=> a.metadata.git.createdAt) | slice(0, 11) %}
{% for note in items %}
<entry>
<id>{{ urlBase }}{{ note.metadata.slug }}</id>
<link href="{{ urlBase }}{{ note.metadata.slug }}"/>
Expand Down

0 comments on commit 84a6b13

Please sign in to comment.