diff --git a/src/cryogen_core/classpath_able_io.clj b/src/cryogen_core/classpath_able_io.clj index fa6a707..a4f014b 100644 --- a/src/cryogen_core/classpath_able_io.clj +++ b/src/cryogen_core/classpath_able_io.clj @@ -36,8 +36,10 @@ (defn filter-resources-for-ignore-patterns [ignore-patterns resources] - (filter #(not (re-matches (re-pattern ignore-patterns) (:virtual-path %))) - resources)) + (if ignore-patterns + (filter #(not (re-matches (re-pattern ignore-patterns) (:virtual-path %))) + resources) + resources)) (defn resource-from-cp-or-fs ;:- Resource [fs-prefix ;:- Prefix diff --git a/src/cryogen_core/new_io.clj b/src/cryogen_core/new_io.clj index dc011d6..31b9934 100644 --- a/src/cryogen_core/new_io.clj +++ b/src/cryogen_core/new_io.clj @@ -41,8 +41,9 @@ (let [base-path "templates/md" resources (cp-io/get-resources fs-prefix base-path [pages posts]) - filtered-resources (->> (filter #(= (:resource-type %) :dir) resources) - (cp-io/distinct-resources-by-path))] + filtered-resources (cp-io/filter-resources-for-ignore-patterns ignore-patterns + (->> (filter #(= (:resource-type %) :dir) resources) + (cp-io/distinct-resources-by-path)))] filtered-resources)) (defn create-dirs-from-markup-folders! @@ -75,6 +76,7 @@ if no, return empty vector." (->> assets filter-file filter-ext + (cp-io/filter-resources-for-ignore-patterns ignored-files) (map get-java-file)))) ;