added todos
This commit is contained in:
parent
297f37c469
commit
bbae94fa8c
1 changed files with 38 additions and 56 deletions
|
@ -493,32 +493,22 @@
|
||||||
sass-dest keep-files ignored-files previews?
|
sass-dest keep-files ignored-files previews?
|
||||||
author-root-uri theme debug? page-model
|
author-root-uri theme debug? page-model
|
||||||
page-root-uri resources]
|
page-root-uri resources]
|
||||||
:as config}
|
:as config} (read-config)
|
||||||
(read-config)
|
posts (map klipsify (add-prev-next (read-posts config)))
|
||||||
posts
|
posts-by-tag (group-by-tags posts)
|
||||||
(map klipsify (add-prev-next (read-posts config)))
|
posts (tag-posts posts config)
|
||||||
posts-by-tag
|
latest-posts (->> posts (take recent-posts) vec)
|
||||||
(group-by-tags posts)
|
klipsified-pages (map klipsify (read-pages config))
|
||||||
posts
|
modelled-pages (cond
|
||||||
(tag-posts posts config)
|
|
||||||
latest-posts
|
|
||||||
(->> posts (take recent-posts) vec)
|
|
||||||
klipsified-pages
|
|
||||||
(map klipsify (read-pages config))
|
|
||||||
modelled-pages
|
|
||||||
(cond
|
|
||||||
(= page-model :flat) klipsified-pages
|
(= page-model :flat) klipsified-pages
|
||||||
(= page-model :hierarchic) (hierarchic/build-hierarchic-map page-root-uri klipsified-pages))
|
(= page-model :hierarchic) (hierarchic/build-hierarchic-map page-root-uri klipsified-pages))
|
||||||
home-page
|
home-page (->> modelled-pages
|
||||||
(->> modelled-pages
|
|
||||||
(filter #(boolean (:home? %)))
|
(filter #(boolean (:home? %)))
|
||||||
(first))
|
(first))
|
||||||
other-pages
|
other-pages (->> modelled-pages
|
||||||
(->> modelled-pages
|
|
||||||
(remove #{home-page})
|
(remove #{home-page})
|
||||||
(add-prev-next))
|
(add-prev-next))
|
||||||
params
|
params (merge config
|
||||||
(merge config
|
|
||||||
{:today (java.util.Date.)
|
{:today (java.util.Date.)
|
||||||
:title (:site-title config)
|
:title (:site-title config)
|
||||||
:active-page "home"
|
:active-page "home"
|
||||||
|
@ -533,20 +523,12 @@
|
||||||
:tags-uri (page-uri "tags.html" config)
|
:tags-uri (page-uri "tags.html" config)
|
||||||
:rss-uri (cryogen-io/path "/" blog-prefix rss-name)
|
:rss-uri (cryogen-io/path "/" blog-prefix rss-name)
|
||||||
:site-url (if (.endsWith site-url "/") (.substring site-url 0 (dec (count site-url))) site-url)})
|
:site-url (if (.endsWith site-url "/") (.substring site-url 0 (dec (count site-url))) site-url)})
|
||||||
file-resource-prefix
|
file-resource-prefix "resources/"
|
||||||
"resources/"
|
resource-prefix (str "templates/themes/" theme)
|
||||||
resource-prefix
|
file-uri (:uri
|
||||||
(str "templates/themes/" theme)
|
|
||||||
file-uri
|
|
||||||
(:uri
|
|
||||||
(cp-io/resource-from-cp-or-fs
|
(cp-io/resource-from-cp-or-fs
|
||||||
file-resource-prefix resource-prefix ""
|
file-resource-prefix resource-prefix ""
|
||||||
:from-cp false))
|
:from-cp false))]
|
||||||
cp-uri
|
|
||||||
(:uri
|
|
||||||
(cp-io/resource-from-cp-or-fs
|
|
||||||
file-resource-prefix resource-prefix ""
|
|
||||||
:from-fs false))]
|
|
||||||
(when debug?
|
(when debug?
|
||||||
(println (blue "debug: page-model:"))
|
(println (blue "debug: page-model:"))
|
||||||
(println "\t-->" (cyan page-model))
|
(println "\t-->" (cyan page-model))
|
||||||
|
@ -554,7 +536,8 @@
|
||||||
(println "\t-->" (cyan file-uri))
|
(println "\t-->" (cyan file-uri))
|
||||||
(println (blue "debug: home-page:"))
|
(println (blue "debug: home-page:"))
|
||||||
(println "\t-->" (cyan (-> params :home-page))))
|
(println "\t-->" (cyan (-> params :home-page))))
|
||||||
;; TODO: inline in compile* fns
|
;; TODO: 1. Copy theme/html from fs & cp -> target/theme/html
|
||||||
|
;; TODO: 2. use target/theme as custome-resource-path
|
||||||
(set-custom-resource-path! (.toString file-uri))
|
(set-custom-resource-path! (.toString file-uri))
|
||||||
;(cryogen-io/wipe-public-folder keep-files)
|
;(cryogen-io/wipe-public-folder keep-files)
|
||||||
(cp-io/delete-resource-recursive! (cp-io/path "resources/public" blog-prefix))
|
(cp-io/delete-resource-recursive! (cp-io/path "resources/public" blog-prefix))
|
||||||
|
@ -578,7 +561,6 @@
|
||||||
ignored-files)
|
ignored-files)
|
||||||
; TODO: Hier weitermachen
|
; TODO: Hier weitermachen
|
||||||
(compile-pages params modelled-pages)
|
(compile-pages params modelled-pages)
|
||||||
;(compile-pages params modelled-pages file-uri cp-uri)
|
|
||||||
(compile-posts params posts)
|
(compile-posts params posts)
|
||||||
(compile-tags params posts-by-tag)
|
(compile-tags params posts-by-tag)
|
||||||
(compile-tags-page params)
|
(compile-tags-page params)
|
||||||
|
|
Loading…
Reference in a new issue