diff options
Diffstat (limited to 'haunt')
-rw-r--r-- | haunt/builder/atom.scm | 9 | ||||
-rw-r--r-- | haunt/builder/rss.scm | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/haunt/builder/atom.scm b/haunt/builder/atom.scm index 9a015b2..c580aaf 100644 --- a/haunt/builder/atom.scm +++ b/haunt/builder/atom.scm @@ -171,6 +171,7 @@ (file-name "feed.xml") (subtitle "Recent Posts") (filter posts/reverse-chronological) + (last-updated (current-date)) (max-entries 20) (blog-prefix "")) "Return a builder procedure that renders a list of posts as an Atom @@ -182,6 +183,8 @@ SUBTITLE: The feed subtitle. FILTER: The procedure called to manipulate the posts list before rendering. +LAST-UPDATED: The feed last updated date. + MAX-ENTRIES: The maximum number of posts to render in the feed. BLOG-PREFIX: The prefix for all post URLs, which is the combination of @@ -196,7 +199,7 @@ the blog's prefix and post prefix." (title ,(site-title site)) (id ,uri) (subtitle ,subtitle) - (updated ,(date->string* (current-date))) + (updated ,(date->string* last-updated)) (link (@ (href ,uri) (rel "self"))) (link (@ (href ,(uri->string @@ -211,6 +214,7 @@ the blog's prefix and post prefix." (define* (atom-feeds-by-tag #:key (prefix "feeds/tags") (filter posts/reverse-chronological) + (last-updated (current-date)) (max-entries 20) (blog-prefix "")) "Return a builder procedure that renders an atom feed for every tag @@ -221,6 +225,8 @@ PREFIX: The directory in which to write the feeds. FILTER: The procedure called to manipulate the posts list before rendering. +LAST-UPDATED: The feed last updated date. + MAX-ENTRIES: The maximum number of posts to render in each feed. BLOG-PREFIX: The prefix for all post URLs, which is the combination of @@ -232,6 +238,7 @@ the blog's prefix and post prefix." ((atom-feed #:file-name (string-append prefix "/" tag ".xml") #:subtitle (string-append "Tag: " tag) #:filter filter + #:last-updated last-updated #:max-entries max-entries #:blog-prefix blog-prefix) site posts))) diff --git a/haunt/builder/rss.scm b/haunt/builder/rss.scm index d614d9d..d78a26b 100644 --- a/haunt/builder/rss.scm +++ b/haunt/builder/rss.scm @@ -92,6 +92,7 @@ (subtitle "Recent Posts") (filter posts/reverse-chronological) (max-entries 20) + (publication-date (current-date)) (blog-prefix "")) "Return a builder procedure that renders a list of posts as an RSS feed. All arguments are optional: @@ -105,6 +106,8 @@ rendering. MAX-ENTRIES: The maximum number of posts to render in the feed. +PUBLICATION-DATE: The feed publication date. + BLOG-PREFIX: The prefix for all post URLs, which is the combination of the blog's prefix and post prefix." (lambda (site posts) @@ -116,7 +119,7 @@ the blog's prefix and post prefix." ;; It looks like RSS's description and atom's subtitle ;; are equivalent? (description ,subtitle) - (pubDate ,(date->rfc822-str (current-date))) + (pubDate ,(date->rfc822-str publication-date)) (link ,(string-append (symbol->string (site-scheme site)) |