added find-assets + fiexed tests

This commit is contained in:
lukas 2020-02-20 13:31:32 +01:00
parent f75a1a9c51
commit 97187f7028
2 changed files with 3 additions and 10 deletions

View file

@ -44,17 +44,10 @@
looking under the implemented protocol's subdirectory, but fallsback to look
at the templates directory."
[root mu ignored-files]
; TODO: Find assets in overlay location / move to new-io
(let [assets (cryogen-io/find-assets
(new-io/path "templates" (m/dir mu) root)
(m/ext mu)
ignored-files)]
(let [assets (new-io/find-assets (str "templates/" (m/dir mu)) [root] (m/ext mu) ignored-files)]
(if (seq assets)
assets
(cryogen-io/find-assets
(new-io/path "templates" root)
(m/ext mu)
ignored-files))))
(new-io/find-assets "templates" [root] (m/ext mu) ignored-files))))
(defn find-posts
"Returns a list of markdown files representing posts under the post root."

View file

@ -68,7 +68,7 @@ and more content.
(let [entries (check-fn mu)]
(is (= 1 (count entries)))
(is (= (.getAbsolutePath (File. (str dir File/separator file)))
(.getAbsolutePath (first entries)))))
(.toString (.toAbsolutePath (:java-path (first entries)))))))
(reset-resources)))))))
(defmacro with-markup [mu & body]