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