Add separate index page
Move the old blog list to `/blog/' * tekuti/config.scm (*index-content*): New configuration, SXML contents of the index page. Should be overridden in any usual way. * tekuti/page.scm (page-blog): Renamed from `page-index'. (page-index): New page. Just returns `*index-content*'. * tekuti/web.scm (choose-handler): Send `/blog/' to `page-blog'.
This commit is contained in:
parent
c32c4f6240
commit
d66887ef56
3 changed files with 9 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
*private-host* *private-port* *private-path-base*
|
||||
*bootstrap-base* *git-dir* *git* *debug* *admin-user*
|
||||
*admin-pass* *css-file* *navbar-links* *navbar-infix*
|
||||
*title* *subtitle* *name*
|
||||
*title* *subtitle* *name* *index-content*
|
||||
*server-impl* *server-impl-args*))
|
||||
|
||||
(define *public-host* "127.0.0.1")
|
||||
|
@ -54,6 +54,9 @@
|
|||
(define *title* "My blog")
|
||||
(define *subtitle* "Just a blog, ok")
|
||||
(define *name* "Joe Schmo")
|
||||
(define *index-content*
|
||||
'((h1 "Hello, World!")
|
||||
"I am here to show you something new."))
|
||||
|
||||
(define *server-impl* 'http)
|
||||
(define *server-impl-args*
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
page-admin-change
|
||||
page-admin-revert-change
|
||||
page-index
|
||||
page-blog
|
||||
page-show-post
|
||||
page-new-comment
|
||||
page-archives
|
||||
|
@ -185,6 +186,9 @@
|
|||
#:redirect (relurl '("admin")))))))
|
||||
|
||||
(define (page-index request body index)
|
||||
(respond *index-content*))
|
||||
|
||||
(define (page-blog request body index)
|
||||
(respond `((div (@ (class "row"))
|
||||
(div (@ (class "span9"))
|
||||
,@(map (lambda (post)
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
((GET admin changes sha1!) page-admin-change)
|
||||
((POST admin revert-change sha1!) page-admin-revert-change)
|
||||
((GET) page-index)
|
||||
((GET blog) page-blog)
|
||||
((GET archives year? month? day?) page-archives)
|
||||
((GET archives year! month! day! post!) page-show-post)
|
||||
((POST archives year! month! day! post!) page-new-comment)
|
||||
|
|
Loading…
Reference in a new issue