move content to the right place

This commit is contained in:
jem 2020-02-21 16:10:30 +01:00
parent 4ace15d5db
commit 4afdb823d8
3 changed files with 6 additions and 5 deletions

View file

@ -43,10 +43,11 @@
looking under the implemented protocol's subdirectory, but fallsback to look
at the templates directory."
[root mu ignored-files]
(let [assets (new-io/find-assets (str "templates/" (m/dir mu)) [root] (m/ext mu) ignored-files)]
(let [assets (new-io/find-assets "content" (str "templates/" (m/dir mu))
[root] (m/ext mu) ignored-files)]
(if (seq assets)
assets
(new-io/find-assets "templates" [root] (m/ext mu) ignored-files))))
(new-io/find-assets "content" "templates" [root] (m/ext mu) ignored-files))))
(defn find-posts
"Returns a list of markdown files representing posts under the post root."

View file

@ -71,8 +71,8 @@
extension (ext) ignoring any files that match the given (ignored-files).
First make sure that the root directory exists, if yes: process as normal;
if no, return empty vector."
[base-path paths ext ignored-files]
(let [assets (cp-io/get-resources "content" base-path paths)
[fs-prefix base-path paths ext ignored-files]
(let [assets (cp-io/get-resources fs-prefix base-path paths)
filter-file (fn [xs] (filter #(= (:resource-type %) :file) xs))
filter-ext (fn [xs] (filter #(= (get-file-extension-from-resource %) ext) xs))
cast-file (fn [java-path] (io/as-file (.toString java-path)))

View file

@ -19,7 +19,7 @@
{:tag :urlset
:attrs {:xmlns "http://www.sitemaps.org/schemas/sitemap/0.9"}
:content
(for [^java.io.File f (new-io/find-assets "" ["public"] ".html" ignored-files)]
(for [^java.io.File f (new-io/find-assets "content" "" ["public"] ".html" ignored-files)]
{:tag :url
:content
[{:tag :loc