write cache entirely as s-expression because easier
This commit is contained in:
parent
06515afc50
commit
247356cd92
|
@ -148,15 +148,15 @@
|
||||||
(process-hashtags! b instance-url hashtags))
|
(process-hashtags! b instance-url hashtags))
|
||||||
(parse-markdown post-content)))
|
(parse-markdown post-content)))
|
||||||
(write `((is-meow #t)
|
(write `((is-meow #t)
|
||||||
(hashtags ,(set->list hashtags))) out)
|
(hashtags ,(set->list hashtags))
|
||||||
(for ([item (in-list post-htmls)])
|
(toc ,(toc post-htmls))
|
||||||
(write-string (xexpr->string item) out)))))
|
(content ,post-htmls)) out))))
|
||||||
|
|
||||||
(for/fold ([posts (set)]) ([post-name (in-list (directory-list "src/posts"))]
|
(for/fold ([posts (set)]) ([post-name (in-list (directory-list "src/posts"))]
|
||||||
#:when (regexp-match? #px"\\.md$" post-name))
|
#:when (regexp-match? #px"\\.md$" post-name))
|
||||||
(define post-src (build-path "src/posts" post-name))
|
(define post-src (build-path "src/posts" post-name))
|
||||||
(define cache-dst (build-path "cache/posts"
|
(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))))
|
(set-add posts (make-post-cache-rule post-src cache-dst))))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue