From fe03d240747fd369fa4769feaa97134f29ba6e59 Mon Sep 17 00:00:00 2001 From: Josha von Gizycki Date: Mon, 12 Nov 2018 19:46:12 +0100 Subject: [PATCH] move index.html to root of input-root --- resources/page/{structure => }/index.html | 0 src/leiningen/equilibrium.clj | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) rename resources/page/{structure => }/index.html (100%) diff --git a/resources/page/structure/index.html b/resources/page/index.html similarity index 100% rename from resources/page/structure/index.html rename to resources/page/index.html diff --git a/src/leiningen/equilibrium.clj b/src/leiningen/equilibrium.clj index fce1188..130c813 100644 --- a/src/leiningen/equilibrium.clj +++ b/src/leiningen/equilibrium.clj @@ -24,8 +24,8 @@ (defn render-markdown [content] (md/md-to-html-string content)) -(defn index-page [] - (slurp (str input-root "/structure/index.html"))) +(defn index-template [] + (slurp (str input-root "/index.html"))) (defn clean-name [filename] (let [end (- (count filename) 3) @@ -113,9 +113,9 @@ {:content "dinge"}) ) -(defn write-sites [context index-page sites] +(defn write-sites [context template sites] (doseq [site sites - :let [translated (fill-in-placeholders context index-page site) + :let [translated (fill-in-placeholders context template site) filename (filename (:file site)) destination (site-destination filename)]] (spit destination translated))) @@ -132,9 +132,9 @@ (.mkdirs (io/file "target/page")) (let [sites (md-files (str input-root "/sites")) rendered-sites (map analysed-page sites) - index-page (index-page) + template (index-template) context {:navcode (navcode sites)}] - (write-sites context index-page rendered-sites))) + (write-sites context template rendered-sites))) (comment (render {})