aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2025-05-17 04:00:25 +0200
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2025-06-15 01:30:32 +0200
commit038b435769ed8c527ecfb7948f589d7d0b8022c7 (patch)
treec8bb393b294fa439be3b1cb1ee87540a28ba2091
parent1268b3395e48f6b3bd5c373e15fe3454b42ef620 (diff)
downloadhaunt-blog-038b435769ed8c527ecfb7948f589d7d0b8022c7.tar.gz
haunt-blog-038b435769ed8c527ecfb7948f589d7d0b8022c7.tar.bz2
haunt-blog-038b435769ed8c527ecfb7948f589d7d0b8022c7.zip
Fix #<unspecified> appearing when there are no Comments section.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--website/builders/replicant-blog.scm37
1 files changed, 20 insertions, 17 deletions
diff --git a/website/builders/replicant-blog.scm b/website/builders/replicant-blog.scm
index f8e5c46..1c7c525 100644
--- a/website/builders/replicant-blog.scm
+++ b/website/builders/replicant-blog.scm
@@ -111,29 +111,32 @@
"."))
(div (@ (id "post-content")) ,(post-sxml post))
- (h1 "Comments")
- ,(cond
- ((and (post-ref post 'thread-link)
- (post-ref post 'thread-name))
- (assert (post-ref post 'thread-name))
- `(div
- (p "You can view replies on the Replicant mailing list, in the "
- (a (@ (href ,(post-ref post 'thread-link)))
- ,(post-ref post 'thread-name)) " thread.")
- (p "If you also want to comment on this blog post, you can simply
+ ,(if
+ (and (post-ref post 'thread-link)
+ (post-ref post 'thread-name))
+ `(div
+ (h1 "Comments")
+ (p "You can view replies on the Replicant mailing list, in the "
+ (a (@ (href ,(post-ref post 'thread-link)))
+ ,(post-ref post 'thread-name)) " thread.")
+ (p "If you also want to comment on this blog post, you can simply
reply to the "
- (a (@ (href ,(post-ref post 'thread-link)))
- ,(post-ref post 'thread-name)) " thread.")
+ (a (@ (href ,(post-ref post 'thread-link)))
+ ,(post-ref post 'thread-name)) " thread.")
- (p "If for some reasons you can't reply to this thread or you don't
+ (p "If for some reasons you can't reply to this thread or you don't
know how to do it, simply write a mail to the mailing list instead.")
- (p "It is easier for everybody if you subscribe to the mailing list
+ (p "It is easier for everybody if you subscribe to the mailing list
to do that: if you don't your mail will probably still reach the mailing list
but it will require a moderator to approve it so it can take time. See "
- (a (@ (href "https://redmine.replicant.us/projects/replicant/wiki/CommunityAndContact#Mailing-list"))
- "the CommunityAndContact page")
- " on the Replicant wiki for how to subscribe"))))))
+ (a (@ (href "https://redmine.replicant.us/projects/replicant/wiki/CommunityAndContact#Mailing-list"))
+ "the CommunityAndContact page")
+ " on the Replicant wiki for how to subscribe"))
+ ;; Empty div to avoid #<unspecified> showing up on the page when we have
+ ;; no comments.
+ `(div))))
+
(define (sort-posts-by-most-recent-first a b)
(time>?