added find-assets + fiexed tests
This commit is contained in:
parent
f75a1a9c51
commit
97187f7028
2 changed files with 3 additions and 10 deletions
|
@ -44,17 +44,10 @@
|
||||||
looking under the implemented protocol's subdirectory, but fallsback to look
|
looking under the implemented protocol's subdirectory, but fallsback to look
|
||||||
at the templates directory."
|
at the templates directory."
|
||||||
[root mu ignored-files]
|
[root mu ignored-files]
|
||||||
; TODO: Find assets in overlay location / move to new-io
|
(let [assets (new-io/find-assets (str "templates/" (m/dir mu)) [root] (m/ext mu) ignored-files)]
|
||||||
(let [assets (cryogen-io/find-assets
|
|
||||||
(new-io/path "templates" (m/dir mu) root)
|
|
||||||
(m/ext mu)
|
|
||||||
ignored-files)]
|
|
||||||
(if (seq assets)
|
(if (seq assets)
|
||||||
assets
|
assets
|
||||||
(cryogen-io/find-assets
|
(new-io/find-assets "templates" [root] (m/ext mu) ignored-files))))
|
||||||
(new-io/path "templates" root)
|
|
||||||
(m/ext mu)
|
|
||||||
ignored-files))))
|
|
||||||
|
|
||||||
(defn find-posts
|
(defn find-posts
|
||||||
"Returns a list of markdown files representing posts under the post root."
|
"Returns a list of markdown files representing posts under the post root."
|
||||||
|
|
|
@ -68,7 +68,7 @@ and more content.
|
||||||
(let [entries (check-fn mu)]
|
(let [entries (check-fn mu)]
|
||||||
(is (= 1 (count entries)))
|
(is (= 1 (count entries)))
|
||||||
(is (= (.getAbsolutePath (File. (str dir File/separator file)))
|
(is (= (.getAbsolutePath (File. (str dir File/separator file)))
|
||||||
(.getAbsolutePath (first entries)))))
|
(.toString (.toAbsolutePath (:java-path (first entries)))))))
|
||||||
(reset-resources)))))))
|
(reset-resources)))))))
|
||||||
|
|
||||||
(defmacro with-markup [mu & body]
|
(defmacro with-markup [mu & body]
|
||||||
|
|
Loading…
Reference in a new issue