summary refs log tree commit diff stats
path: root/lib/config.sld
diff options
context:
space:
mode:
Diffstat (limited to 'lib/config.sld')
-rw-r--r--lib/config.sld45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/config.sld b/lib/config.sld new file mode 100644 index 0000000..bdd6ef5 --- /dev/null +++ b/lib/config.sld
@@ -0,0 +1,45 @@
1;;; (boudin config) --- default values for configuration options
2;;
3;; To change these, make a `config.scm' in your site's root directory and change
4;; these. They're all parameters so .. change em like that.
5
6(define-library (boudin config)
7 (import (scheme base)
8 (boudin schmaltz)
9 ;; not portable
10 (chicken pathname)
11 (html-parser)
12 )
13
14 (export site-url site-dest
15 page-path-transformers page-text-transformers
16 page-template index-template feed-template)
17
18 (begin
19 ;; Site information
20 (define site-url
21 (make-parameter "example.com"))
22 (define site-dest
23 (make-parameter "out/"))
24 ;; Transformers
25 (define page-path-transformers
26 (make-parameter
27 (list (lambda (path) (make-pathname (site-dest) path)))))
28 (define page-text-transformers
29 (make-parameter
30 (list wrap-paragraphs
31 render-string
32 html->sxml)))
33 ;; Templates --- note that we use quote but include unquote forms here.
34 ;; This is to simplify the configuration and to avoid a cyclical dependency
35 ;; with (boudin types).
36 (define page-template
37 (make-parameter
38 '(html (@ (lang "en-us"))
39 (head (title (or (page-ref pg "title") "[untitled]")))
40 (body ,@(page-sxml pg)))))
41 (define index-template
42 (make-parameter 'todo))
43 (define feed-template
44 (make-parameter 'todo))
45 ))