From be0aeeb80daa05435d3275cc8a10c5eff7291356 Mon Sep 17 00:00:00 2001 From: Charlotte Allen Date: Mon, 3 Feb 2020 12:53:54 -0800 Subject: [PATCH] Revert to digits for writing a post, and use correct "pr-str" to write edn data. --- src/clj/shapey_shifty/posts/posts_io.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/clj/shapey_shifty/posts/posts_io.clj b/src/clj/shapey_shifty/posts/posts_io.clj index b6b803b..9900acf 100644 --- a/src/clj/shapey_shifty/posts/posts_io.clj +++ b/src/clj/shapey_shifty/posts/posts_io.clj @@ -25,9 +25,9 @@ (defn write-post [post dt-path] (let [path (pathmap-to-path dt-path) increment (inc (count-posts-in-date dt-path)) - final-path (format "%s/%s/%d/%s" base-posts-path path increment post-filename)] + final-path (format "%d/%d/%d/%d" base-posts-path path increment post-filename)] (clojure.java.io/make-parents final-path) - (spit final-path post))) + (spit final-path (pr-str post)))) (defn assoc-author [post] (let [filename (get-in post [:properties :author])