commit 4d946baea340b63afe6d01bdb4e0415ead6bae96
parent 8f1142f7314881c056e11995f9c6f5363c243108
Author: Daniel Barlow <dan@telent.net>
Date: Tue, 15 Sep 2026 21:42:48 +0100
don't send title in RSS feed item description
the feed item body contained <h1>title</h1> and rendered date, which
means readers were potentially duplicating them
Diffstat:
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/main.fnl b/main.fnl
@@ -236,7 +236,7 @@ href=\"https://axillae.telent.net/\">@dan@axillae.telent.net</a>
(let [path post.full-path
s (stream-from-cq-stream stream)]
(print :path path)
- (post:body collection s)))
+ (post:div collection s)))
(fn send-search-results [stream format collection results]
(each [_ p (ipairs results)]
diff --git a/site.fnl b/site.fnl
@@ -92,7 +92,6 @@
(with-open [f (io.open path :r)]
(when f
(f:seek :set post.body-offset)
- (post-header post stream)
(if (string.match path "%.textile$")
(each [_ el (ipairs (textile.parse f))
&until (and excerpt? (> (f:seek :cur 0) 500))]
@@ -101,7 +100,12 @@
(translate-markdown site (f:read (if excerpt? 600 "*a")))))
(when (and excerpt? (= (f:read 0) ""))
(to-html [[:div {:class :continuelink}] [:div [[:a { :href post.url-path}] "... continue reading"]]] stream))
- (stream:write "</div>")))))
+ ))))
+
+(fn post-div [post site stream excerpt?]
+ (post-header post stream)
+ (post-body post site stream excerpt?)
+ (stream:write "</div>"))
(fn frontmatter [stream]
@@ -182,6 +186,7 @@
(tset :title title)
(tset :topics topics)
(tset :body post-body)
+ (tset :div post-div)
(tset :body-offset (f:seek :cur 0))
(tset :terms (or (read-stemmed-terms f)
(error (.. "no terms in " name))))