Skip to content

Commit

Permalink
support sub directories in pages and posts
Browse files Browse the repository at this point in the history
  • Loading branch information
matsu911 committed Oct 18, 2016
1 parent 98992b7 commit 510c33c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cryogen_core/compiler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
the file with the given markup."
[^java.io.File page config markup]
(with-open [rdr (java.io.PushbackReader. (reader page))]
(let [page-name (.getName page)
(let [re-root (re-pattern (str "^.*?(" (:page-root config) "|" (:post-root config) ")/"))
page-name (s/replace (str page) re-root "")
file-name (s/replace page-name (re-pattern-from-ext (m/ext markup)) ".html")
page-meta (read-page-meta page-name rdr)
content ((m/render-fn markup) rdr config)]
Expand Down

0 comments on commit 510c33c

Please sign in to comment.