summaryrefslogtreecommitdiff
path: root/haunt.scm
diff options
context:
space:
mode:
authorJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-02 17:00:09 -0400
committerJakob L. Kreuze <zerodaysfordays@sdf.lonestar.org>2019-05-02 19:25:40 -0400
commit1a9076df9aa9a27ed653523240ec58e7f1e7aa05 (patch)
tree0031b643732ffa34cfe97020ced70289e966b071 /haunt.scm
parent6557a074a50d28816af4c117768860f2ebe911d0 (diff)
Change 'make-slug function
Diffstat (limited to 'haunt.scm')
-rw-r--r--haunt.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/haunt.scm b/haunt.scm
index d171f98..7fd9355 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -72,6 +72,14 @@
#:default-metadata
'((author . "Jakob L. Kreuze")
(email . "zerodaysfordays@sdf.lonestar.org"))
+ #:make-slug (lambda (post)
+ (let* ((file-name (post-file-name post))
+ (splice-start (+ (string-rindex file-name
+ (cut char=? <> #\/))
+ 1))
+ (splice-end (string-rindex file-name
+ (cut char=? <> #\.))))
+ (substring file-name splice-start splice-end)))
#:readers (list html-reader-prime)
#:builders (list (blog #:theme jakob-theme #:collections %collections)
(article-aliases %aliases)