add some more debug options

This commit is contained in:
Michael Jerger 2016-12-31 15:48:52 +01:00
parent 173472e9df
commit 773ee269b9

View file

@ -245,13 +245,15 @@
(defn compile-posts (defn compile-posts
"Compiles all the posts into html and spits them out into the public folder" "Compiles all the posts into html and spits them out into the public folder"
[{:keys [blog-prefix post-root-uri disqus-shortname] :as params} posts] [{:keys [blog-prefix post-root-uri disqus-shortname debug?] :as params} posts]
(when-not (empty? posts) (when-not (empty? posts)
(println (blue "compiling posts")) (println (blue "compiling posts"))
(create-folder (path "/" blog-prefix post-root-uri)) (create-folder (path "/" blog-prefix post-root-uri))
(doseq [post posts] (doseq [post posts]
(println "\t-->" (cyan (:uri post))) (println "\t-->" (cyan (:uri post)))
(println "\t-->" (cyan post)) (println "\t-->" (cyan debug?))
(when debug?
(println "\t-->" (cyan post)))
(write-html (:uri post) (write-html (:uri post)
params params
(render-file (str "/html/" (:layout post)) (render-file (str "/html/" (:layout post))
@ -490,6 +492,8 @@
:site-url (if (.endsWith site-url "/") (.substring site-url 0 (dec (count site-url))) site-url) :site-url (if (.endsWith site-url "/") (.substring site-url 0 (dec (count site-url))) site-url)
:theme-path (str "file:resources/templates/themes/" (:theme config))})] :theme-path (str "file:resources/templates/themes/" (:theme config))})]
(println (blue "debug info"))
(println "\t-->" (cyan navbar))
(set-custom-resource-path! (:theme-path params)) (set-custom-resource-path! (:theme-path params))
(wipe-public-folder keep-files) (wipe-public-folder keep-files)
(println (blue "copying theme resources")) (println (blue "copying theme resources"))