diff options
| author | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-02 16:20:26 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> | 2019-05-02 16:20:26 -0400 |
| commit | 849efab76c602a2410fc3f4c946314ebb35c9d12 (patch) | |
| tree | d8cf5d67f880e97246a1ffbef74261d11d8d6bfd /haunt.scm | |
| parent | 7405049f201bfc26c840adb1937912b5ac06cc82 (diff) | |
Load static pages rather than inlining
Diffstat (limited to 'haunt.scm')
| -rw-r--r-- | haunt.scm | 26 |
1 files changed, 8 insertions, 18 deletions
@@ -53,23 +53,13 @@ (register-metadata-parser! 'date org-string->date) -(define (static-page title file-name body) +(define (static-page title slug) (lambda (site posts) - (make-page file-name - (with-layout jakob-theme site title body) - sxml->html))) - -(define about-page - (static-page - "About Me" - "about.html" - `((h2 "Hi.")))) - -(define projects-page - (static-page - "Projects" - "projects.html" - `((h1 "Projects")))) + (let ((file-name (format #f "~a.html" slug)) + (body (load (format #f "~a.scm" slug)))) + (make-page file-name + (with-layout jakob-theme site title body) + sxml->html)))) (define %collections `(("Recent Posts" "index.html" ,posts/reverse-chronological))) @@ -87,8 +77,8 @@ (article-aliases %aliases) (atom-feed) (sort-by-tag) - about-page - projects-page + (static-page "About Me" "about") + (static-page "Projects" "projects") (static-directory "css") (static-directory "fonts") (static-directory "images"))) |