renamed navpage-model to page-model

This commit is contained in:
Michael Jerger 2017-02-10 14:55:11 +01:00
parent f758b5744d
commit b781b8b9bb

View file

@ -466,7 +466,7 @@
(update-in [:post-date-format] (fnil str "yyyy-MM-dd")) (update-in [:post-date-format] (fnil str "yyyy-MM-dd"))
(update-in [:keep-files] (fnil seq [])) (update-in [:keep-files] (fnil seq []))
(update-in [:ignored-files] (fnil seq [#"^\.#.*" #".*\.swp$"])) (update-in [:ignored-files] (fnil seq [#"^\.#.*" #".*\.swp$"]))
(update-in [:navbar-model] (fnil keyword :flat)) (update-in [:page-model] (fnil keyword :flat))
)] )]
(merge (merge
config config
@ -489,7 +489,7 @@
[] []
(println (green "compiling assets...")) (println (green "compiling assets..."))
(let [{:keys [^String site-url blog-prefix rss-name recent-posts sass-dest keep-files ignored-files previews? (let [{:keys [^String site-url blog-prefix rss-name recent-posts sass-dest keep-files ignored-files previews?
author-root-uri theme debug? navbar-model] author-root-uri theme debug? page-model]
:as config} (read-config) :as config} (read-config)
posts (map klipsify (add-prev-next (read-posts config))) posts (map klipsify (add-prev-next (read-posts config)))
posts-by-tag (group-by-tags posts) posts-by-tag (group-by-tags posts)
@ -511,12 +511,12 @@
:tags (map (partial tag-info config) (keys posts-by-tag)) :tags (map (partial tag-info config) (keys posts-by-tag))
:latest-posts latest-posts :latest-posts latest-posts
:navbar-pages (cond :navbar-pages (cond
(= navbar-model :flat) navbar-pages (= page-model :flat) navbar-pages
(= navbar-model :hierarchic) (hierarchic/build-hierarchic-map navbar-pages) (= page-model :hierarchic) (hierarchic/build-hierarchic-map navbar-pages)
) )
:sidebar-pages (cond :sidebar-pages (cond
(= navbar-model :flat) sidebar-pages (= page-model :flat) sidebar-pages
(= navbar-model :hierarchic) (hierarchic/build-hierarchic-map sidebar-pages) (= page-model :hierarchic) (hierarchic/build-hierarchic-map sidebar-pages)
) )
:home-page (if home-page :home-page (if home-page
home-page home-page
@ -527,8 +527,8 @@
: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)})]
(when debug? (when debug?
(println (blue "debug: navbar-model:")) (println (blue "debug: page-model:"))
(println "\t-->" (cyan navbar-model)) (println "\t-->" (cyan page-model))
(println (blue "debug: navbar-pages:")) (println (blue "debug: navbar-pages:"))
(println "\t-->" (cyan (-> params :navbar-pages))) (println "\t-->" (cyan (-> params :navbar-pages)))
(println (blue "debug: sidebar-pages:")) (println (blue "debug: sidebar-pages:"))