From 247356cd92849c0cc40b76c985e64921aa7bb775 Mon Sep 17 00:00:00 2001 From: haskal Date: Sat, 9 May 2020 03:03:45 -0400 Subject: [PATCH] write cache entirely as s-expression because easier --- private/rules.rkt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/private/rules.rkt b/private/rules.rkt index 43eb206..1950892 100644 --- a/private/rules.rkt +++ b/private/rules.rkt @@ -148,15 +148,15 @@ (process-hashtags! b instance-url hashtags)) (parse-markdown post-content))) (write `((is-meow #t) - (hashtags ,(set->list hashtags))) out) - (for ([item (in-list post-htmls)]) - (write-string (xexpr->string item) out))))) + (hashtags ,(set->list hashtags)) + (toc ,(toc post-htmls)) + (content ,post-htmls)) out)))) (for/fold ([posts (set)]) ([post-name (in-list (directory-list "src/posts"))] #:when (regexp-match? #px"\\.md$" post-name)) (define post-src (build-path "src/posts" post-name)) (define cache-dst (build-path "cache/posts" - (path-replace-extension (last (explode-path post-src)) ".html"))) + (path-replace-extension (last (explode-path post-src)) ".rktd"))) (set-add posts (make-post-cache-rule post-src cache-dst))))