diff options
author | Case Duckworth | 2023-09-06 22:45:45 -0500 |
---|---|---|
committer | Case Duckworth | 2023-09-06 22:45:45 -0500 |
commit | 59598f42c16cf12e544e5bf2ce9c873fba94238e (patch) | |
tree | 055f106b72f289f59d4af417a24448e4983dbec3 /lib/config.sld | |
parent | A new start (again) (diff) | |
download | boudin-59598f42c16cf12e544e5bf2ce9c873fba94238e.tar.gz boudin-59598f42c16cf12e544e5bf2ce9c873fba94238e.zip |
A newerer beginning
Diffstat (limited to 'lib/config.sld')
-rw-r--r-- | lib/config.sld | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/lib/config.sld b/lib/config.sld deleted file mode 100644 index bdd6ef5..0000000 --- a/lib/config.sld +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
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 | )) | ||