From 9cc0a68d9646ede2af1b96fb6d9c9670d8f9acf7 Mon Sep 17 00:00:00 2001 From: "Jakob L. Kreuze" Date: Sat, 19 Nov 2022 12:41:45 -0500 Subject: [builder] Link to internal comment form instead of commentpara.de --- haunt/jakob/builder/blog.scm | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm index 3634de5..531804b 100644 --- a/haunt/jakob/builder/blog.scm +++ b/haunt/jakob/builder/blog.scm @@ -48,19 +48,8 @@ ;;; Rendering. ;;; -(define (build-anonymous-comment-url post) - (let* ((target (format #f "http://jakob.space~a" (post-uri post))) - (params `(("dontask" . "1") - ("me" . "https://commentpara.de") - ("reply" . ,target))) - (query (string-join (map (lambda (pair) - (string-concatenate - (list (uri-encode (car pair)) - "=" - (uri-encode (cdr pair))))) - params) - "&"))) - (format #f "https://quill.p3k.io/?~a" query))) +(define (build-comment-url post) + (format #f "/api/comment-form/~a" (post-slug post))) (define (render-article post) "Return the SHTML for POST's contents." @@ -85,21 +74,19 @@ (@ (id "webmention")) (h2 ,(hyperlink "https://indieweb.org/Webmention" "Webmentions") " for this Page") - (ul (@ (id "webmention-container")) - ;; ,@(render-comment-view (fetch-webmentions (post-identifier post)))) - ,@(render-comment-view (fetch-comments (post-identifier post)))) + (p "Click " ,(hyperlink (build-comment-url post) "here") " to write a comment on this post.") (form (@ (id "webmention-form") (action "https://webmention.io/jakob.space/webmention") (method "post")) - (label "Have you written a " - ,(hyperlink "https://indieweb.org/responses" "response") - " to this? Let me know the URL:") + (label "Alternatively, if you've written about this " + ,(hyperlink "https://indieweb.org/responses" "elsewhere") + ", you can let me know the URL:") (input (@ (name "source") (type "url"))) (input (@ (value "Send Webmention") (type "submit")))) - (p "Alternatively, you can send an " - ,(hyperlink (build-anonymous-comment-url post) "anonymous comment") - ".") + (ul (@ (id "webmention-container")) + ;; ,@(render-comment-view (fetch-webmentions (post-identifier post)))) + ,@(render-comment-view (fetch-comments (post-identifier post)))) ,(script "section-folds.js") ;; ,(script "webmention.js") ))) -- cgit v1.3