summaryrefslogtreecommitdiff
path: root/haunt/jakob/builder
diff options
context:
space:
mode:
Diffstat (limited to 'haunt/jakob/builder')
-rw-r--r--haunt/jakob/builder/blog.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm
index 6cabd16..c9b01c8 100644
--- a/haunt/jakob/builder/blog.scm
+++ b/haunt/jakob/builder/blog.scm
@@ -85,7 +85,7 @@
(h2 ,(hyperlink "https://indieweb.org/Webmention" "Webmentions")
" for this Page")
(ul (@ (id "webmention-container"))
- ,@(render-comment-view (fetch-webmentions (post-slug post))))
+ ,@(render-comment-view (fetch-webmentions (post-identifier post))))
(form
(@ (action "https://webmention.io/jakob.space/webmention")
(method "post"))
@@ -127,13 +127,17 @@
;; Subdirectory for permalink pages.
(define %prefix "/blog")
-(define (post-uri post)
- "Return the path of POST relative to the site's root."
+(define (post-identifier post)
+ "Return the 'slug' that identifies POST."
(let* ((file-name (post-file-name post))
(splice-start (1+ (string-rindex file-name (cut char=? <> #\/))))
(splice-end (string-rindex file-name (cut char=? <> #\.)))
(slug (substring file-name splice-start splice-end)))
- (string-append %prefix "/" slug ".html")))
+ slug))
+
+(define (post-uri post)
+ "Return the path of POST relative to the site's root."
+ (string-append %prefix "/" (post-identifier post) ".html"))
(define (post->page post)
"Return a Haunt page for POST."