Add home to index params when previews are enabled
This commit is contained in:
parent
1fb621e6ed
commit
852b431d71
1 changed files with 4 additions and 2 deletions
|
@ -292,11 +292,13 @@
|
||||||
(create-preview-links blog-prefix))
|
(create-preview-links blog-prefix))
|
||||||
previews (if (> (count previews) 1) (assoc-in previews [1 :prev] (path "/" blog-prefix "index.html")) previews)]
|
previews (if (> (count previews) 1) (assoc-in previews [1 :prev] (path "/" blog-prefix "index.html")) previews)]
|
||||||
(create-folder (path "/" blog-prefix "p"))
|
(create-folder (path "/" blog-prefix "p"))
|
||||||
(doseq [{:keys [index posts prev next]} previews]
|
(doseq [{:keys [index posts prev next]} previews
|
||||||
(create-file (if (= 1 index) (path "/" blog-prefix "index.html") (path "/" blog-prefix "p" (str index ".html")))
|
:let [index-page? (= 1 index)]]
|
||||||
|
(create-file (if index-page? (path "/" blog-prefix "index.html") (path "/" blog-prefix "p" (str index ".html")))
|
||||||
(render-file "/html/previews.html"
|
(render-file "/html/previews.html"
|
||||||
(merge params
|
(merge params
|
||||||
{:active-page "preview"
|
{:active-page "preview"
|
||||||
|
:home (when index-page? true)
|
||||||
:servlet-context (path "/" blog-prefix "/")
|
:servlet-context (path "/" blog-prefix "/")
|
||||||
:posts posts
|
:posts posts
|
||||||
:prev-uri prev
|
:prev-uri prev
|
||||||
|
|
Loading…
Reference in a new issue