master
Josha von Gizycki 5 years ago
parent fec4c12c56
commit 58a900bbe7

@ -14,7 +14,7 @@
(defn env-val [env-name]
(let [env-val (System/getenv env-name)]
(when (= nil env-val)
(when (nil? env-val)
(throw (ex-info (str "env var not found " env-name)
{:env-var env-name})))
env-val))

@ -59,7 +59,7 @@
(page-content "aiaiaiai"))
(defn now-str []
(.toString (LocalDateTime/now)))
(str (LocalDateTime/now)))
(defn file->relpath [file]
(let [fullpath (-> file .toPath .toString)
@ -118,7 +118,8 @@
content (string/replace content #"<p><blink></p>" "")
simple (-> html
(string/replace #"&:content" content)
(string/replace #"&:title" (get-in page [:metadata :title] ""))
(string/replace #"&:title"
(get-in page [:metadata :title] ""))
(string/replace #"&:generated-at" (now-str)))
particles (particles-in-content simple)
last-blog-sites (last-blog-sites-in-content simple)

@ -11,10 +11,10 @@
:ftp-user (System/getenv "EQUILIBRIUM_USER")
:ftp-pass (System/getenv "EQUILIBRIUM_PASS")]
(doseq [file (file-seq (io/file "target/page"))
:let [fname (.toString file)
:let [fname (str file)
relpath (subs fname (count "target/page"))
dir? (.isDirectory file)]
:when (> (count relpath) 0)]
:when (pos? (count relpath))]
(let [dest (subs relpath 1)]
(if dir?
(do

Loading…
Cancel
Save