summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-02 16:11:14 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-02 16:11:14 -0400
commit7405049f201bfc26c840adb1937912b5ac06cc82 (patch)
tree6f3e69841d47fbdba2e9df1f7177a514306128af /haunt.scm
parent57f1b4221d4bbb1f1cf4ddf76a9ce959a25b7023 (diff)
Abstract tag page generation into its own module
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm19
1 files changed, 2 insertions, 17 deletions
diff --git a/haunt.scm b/haunt.scm
index d5bdf1d..05104ec 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -15,6 +15,7 @@
;;; <http://www.gnu.org/licenses/>.
(use-modules (custom alias)
+ (custom tag)
(custom theme)
(haunt builder atom)
(haunt builder assets)
@@ -76,22 +77,6 @@
(define %aliases
'(("blog/post/Bad BEHAVIOR" . "/reverse-engineering-babbys-first-archive-format.html")))
-(define (tag-pages)
- "Return a procedure that transforms a list of posts into pages containing only
-the posts that have a certain tag."
- (lambda (site posts)
- (map (lambda (alist)
- (let* ((tag-name (car alist))
- (posts (cdr alist))
- (title (format #f "Posts tagged as \"~a\"" tag-name))
- (file-name (format #f "tag-~a.html" tag-name))
- (body `(h1 ,(format #f "Tagged as \"~a\"" tag-name))))
- (make-page
- file-name
- (render-collection jakob-theme site title posts #f)
- sxml->html)))
- (posts/group-by-tag posts))))
-
(site #:title "Jakob's Personal Webpage"
#:domain "jakob.space"
#:default-metadata
@@ -101,7 +86,7 @@ the posts that have a certain tag."
#:builders (list (blog #:theme jakob-theme #:collections %collections)
(article-aliases %aliases)
(atom-feed)
- (tag-pages)
+ (sort-by-tag)
about-page
projects-page
(static-directory "css")