Revert to digits for writing a post, and use
correct "pr-str" to write edn data.
This commit is contained in:
parent
4f3cfe4728
commit
be0aeeb80d
|
@ -25,9 +25,9 @@
|
||||||
(defn write-post [post dt-path]
|
(defn write-post [post dt-path]
|
||||||
(let [path (pathmap-to-path dt-path)
|
(let [path (pathmap-to-path dt-path)
|
||||||
increment (inc (count-posts-in-date 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)
|
(clojure.java.io/make-parents final-path)
|
||||||
(spit final-path post)))
|
(spit final-path (pr-str post))))
|
||||||
|
|
||||||
(defn assoc-author [post]
|
(defn assoc-author [post]
|
||||||
(let [filename (get-in post [:properties :author])
|
(let [filename (get-in post [:properties :author])
|
||||||
|
|
Loading…
Reference in a new issue