summaryrefslogtreecommitdiff
path: root/haunt/builder/atom.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2021-03-18 17:51:37 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2021-03-18 17:52:29 -0400
commitd22bf423c1b82bd7ddb47ae1e3cb13f3ee270a0c (patch)
tree7ea249bab45436962187f0aec6ddd38912a98f74 /haunt/builder/atom.scm
parent5255259bf048b863e222c41dc406c91be1b2eba0 (diff)
Create a unified type for build artifacts.
Deprecate <page> and <asset>.
Diffstat (limited to 'haunt/builder/atom.scm')
-rw-r--r--haunt/builder/atom.scm29
1 files changed, 15 insertions, 14 deletions
diff --git a/haunt/builder/atom.scm b/haunt/builder/atom.scm
index 2a6c356..acd74d4 100644
--- a/haunt/builder/atom.scm
+++ b/haunt/builder/atom.scm
@@ -29,6 +29,7 @@
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
#:use-module (sxml simple)
+ #:use-module (haunt artifact)
#:use-module (haunt site)
#:use-module (haunt post)
#:use-module (haunt page)
@@ -184,20 +185,20 @@ MAX-ENTRIES: The maximum number of posts to render in the feed"
(build-uri (site-scheme site)
#:host (site-domain site)
#:path (string-append "/" file-name)))))
- (make-page file-name
- `(feed (@ (xmlns "http://www.w3.org/2005/Atom"))
- (title ,(site-title site))
- (id ,uri)
- (subtitle ,subtitle)
- (updated ,(date->string* (current-date)))
- (link (@ (href ,(string-append (site-domain site)
- "/" file-name))
- (rel "self")))
- (link (@ (href ,(site-domain site))))
- ,@(map (cut post->atom-entry site <>
- #:blog-prefix blog-prefix)
- (take-up-to max-entries (filter posts))))
- sxml->xml*))))
+ (serialized-artifact file-name
+ `(feed (@ (xmlns "http://www.w3.org/2005/Atom"))
+ (title ,(site-title site))
+ (id ,uri)
+ (subtitle ,subtitle)
+ (updated ,(date->string* (current-date)))
+ (link (@ (href ,(string-append (site-domain site)
+ "/" file-name))
+ (rel "self")))
+ (link (@ (href ,(site-domain site))))
+ ,@(map (cut post->atom-entry site <>
+ #:blog-prefix blog-prefix)
+ (take-up-to max-entries (filter posts))))
+ sxml->xml*))))
(define* (atom-feeds-by-tag #:key
(prefix "feeds/tags")