diff options
| author | Henry Webster <hwebs@hwebs.info> | 2026-07-22 10:49:53 -0500 |
|---|---|---|
| committer | Henry Webster <hwebs@hwebs.info> | 2026-07-22 10:49:53 -0500 |
| commit | 3e79adcf54587872282561d6fd4e67f22729cdb3 (patch) | |
| tree | 2b7ac8ecd5127d1e0787223181a07b844bf8accc /theme.scm | |
| parent | 63ae83ade5f1cb95e414ca93b7d38eb884232169 (diff) | |
implement md-based update posts on the now page
Diffstat (limited to 'theme.scm')
| -rw-r--r-- | theme.scm | 32 |
1 files changed, 18 insertions, 14 deletions
@@ -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))))) |
