From 09a389abc83f06c52301108307b1bb566523c276 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 21 Nov 2021 11:09:53 +0100 Subject: Add category info to ATOM feeds --- templates/feed.xml | 17 ++++++++++++++-- templates/feed_entry.xml | 52 +++++++++++++++++++++++------------------------- 2 files changed, 40 insertions(+), 29 deletions(-) (limited to 'templates') diff --git a/templates/feed.xml b/templates/feed.xml index cf9e359..915c000 100644 --- a/templates/feed.xml +++ b/templates/feed.xml @@ -16,9 +16,22 @@ $if(layout.is_categorized_list)$ $for(pages.date_desc)$ - $it.pages.date_desc:feed_entry()$ + $for(it.pages.date_desc)$ + $if(it.url)$ + + + $it:feed_entry()$ + + $endif$ + $endfor$ $endfor$ $else$ - $pages.date_desc:feed_entry()$ + $for(pages.date_desc)$ + $if(it.url)$ + + $it:feed_entry()$ + + $endif$ + $endfor$ $endif$ diff --git a/templates/feed_entry.xml b/templates/feed_entry.xml index f8108f6..03d6569 100644 --- a/templates/feed_entry.xml +++ b/templates/feed_entry.xml @@ -1,27 +1,25 @@ - - $it.url.full$ - <![CDATA[$it.title$]]> - - $it.date.rfc3339$ - $it.last_update.rfc3339$ - $if(it.author)$ - $for(it.author)$ - - $it.name$ - $if(it.email)$ - $it.email$ - $endif$ - - $endfor$ - $else$ - $for(author)$ - - $author.name$ - $if(author.email)$ - $author.email$ - $endif$ - - $endfor$ - $endif$ - - +$it.url.full$ +<![CDATA[$it.title$]]> + +$it.date.rfc3339$ +$it.last_update.rfc3339$ +$if(it.author)$ + $for(it.author)$ + + $it.name$ + $if(it.email)$ + $it.email$ + $endif$ + + $endfor$ +$else$ + $for(author)$ + + $author.name$ + $if(author.email)$ + $author.email$ + $endif$ + + $endfor$ +$endif$ + -- cgit v1.2.3-70-g09d2