From 3e79adcf54587872282561d6fd4e67f22729cdb3 Mon Sep 17 00:00:00 2001 From: Henry Webster Date: Wed, 22 Jul 2026 10:49:53 -0500 Subject: implement md-based update posts on the now page --- theme.scm | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'theme.scm') diff --git a/theme.scm b/theme.scm index b33d504..3320e59 100644 --- a/theme.scm +++ b/theme.scm @@ -79,23 +79,27 @@ (theme #:name "hwebs-now" #:layout layout #:post-template - (lambda (post) - ;; TODO - (define (post-entries post) - ((sxpath '(rss channel item title *text*)) (post-sxml post))) - - (rss-items-template (post-entries post))) + (compose rss-items-template rss-items) #:collection-template (lambda (site title posts prefix) - `(,@(map (lambda (post) + `((p "My implementation of the " + (a (@ (href "https://nownownow.com/about")) "\"now page\" concept by Derek Sivers") + ".") + ,@(map (lambda (post) (define items (rss-items post)) - - `(section (h2 ,(post-ref post 'title)) - ,(rss-items-template - ;; not optimal, btw - (list-head items (min 5 (length items)))) - ;; TODO only show if there are more entries than max? - (a (@ (href ,(post-uri post site prefix))) "See more."))) + (if (member "feed" (post-tags post)) + ;; TODO use dates from the feed for these as well? + ;; TODO combine structure between the two types + `(section (h2 ,(post-ref post 'title)) + ,(rss-items-template + ;; not optimal, btw + (list-head items (min 5 (length items)))) + ;; TODO only show if there are more entries than max? + (a (@ (href ,(post-uri post site prefix))) "See more.")) + `(section (h2 ,(post-ref post 'title)) + ;; TODO fill in datetime correctly + ((time ,(date->string*(post-date post))) + ,(post-sxml post))))) posts))))) -- cgit v1.3