write cache entirely as s-expression because easier

This commit is contained in:
xenia 2020-05-09 03:03:45 -04:00
parent 06515afc50
commit 247356cd92
1 changed files with 4 additions and 4 deletions

View File

@ -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))))