mirror of
https://github.com/journeyman-cc/smeagol.git
synced 2026-04-12 18:05:06 +00:00
make start page configurable
This commit is contained in:
parent
4026e23946
commit
fad1fcfea5
3 changed files with 6 additions and 3 deletions
|
|
@ -28,6 +28,7 @@
|
|||
;; ; ; ; ; ; ; ; ; ;
|
||||
{
|
||||
:content-dir "resources/public/content"
|
||||
:start-page "README"
|
||||
;; where content is served from.
|
||||
:default-locale "en-GB" ;; default language used for messages
|
||||
:formatters {"vega" smeagol.formatting/process-vega
|
||||
|
|
@ -38,6 +39,5 @@
|
|||
;; :trace :debug :info :warn :error :fatal
|
||||
:passwd "resources/passwd"
|
||||
;; where the password file is stored
|
||||
:site-title "Smeagol" ;; overall title of the site, used in
|
||||
:site-title "Smeagol"} ;; overall title of the site, used in
|
||||
;; page headings
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@
|
|||
(or
|
||||
(show-sanity-check-error)
|
||||
(let [params (keywordize-keys (:params request))
|
||||
page (or (:page params) (util/get-message :default-page-title "Introduction" request))
|
||||
page (or (:page params) util/start-page (util/get-message :default-page-title "Introduction" request))
|
||||
file-name (str page ".md")
|
||||
file-path (cjio/file util/content-dir file-name)
|
||||
exists? (.exists (clojure.java.io/as-file file-path))]
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
|
||||
(def start-page
|
||||
(:start-page config))
|
||||
|
||||
(def content-dir
|
||||
(or
|
||||
(:content-dir config)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue