From 216ca5aa5a3b5f82908414fdab591a0e6a6ca9d9 Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Tue, 23 Jul 2019 19:19:34 -0400 Subject: Identify crossposts in Atom post summaries. --- haunt/jakob/builder/atom.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/haunt/jakob/builder/atom.scm b/haunt/jakob/builder/atom.scm index d4f469a..f6bbd08 100644 --- a/haunt/jakob/builder/atom.scm +++ b/haunt/jakob/builder/atom.scm @@ -22,6 +22,7 @@ #:use-module (haunt utils) #:use-module (ice-9 match) #:use-module (jakob builder blog) + #:use-module (jakob utils sxml) #:use-module (srfi srfi-19) #:use-module (srfi srfi-26) #:use-module (web uri) @@ -41,7 +42,14 @@ (updated ,(date->string (post-date post) "~4")) (link (@ (href ,uri) (rel "alternate"))) (summary (@ (type "html")) - ,(sxml->html-string (post-sxml post))) + ,(sxml->html-string + (append (post-sxml post) + (if (post-ref post 'crosspost) + `((p "...") + (p "This is a crosspost. Click " + ,(hyperlink (post-ref post 'crosspost) "here") + " to read the rest of the article.")) + '())))) ,@(map (lambda (enclosure) `(link (@ (rel "enclosure") (title ,(enclosure-title enclosure)) -- cgit v1.3