From 61d3b6aae43e1ad870e7832ec964964124eacb1b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 15 Sep 2023 00:19:37 -0500 Subject: Fix bugs and implement changes I can actually build a (one-page) site! --- boudin.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'boudin.scm') diff --git a/boudin.scm b/boudin.scm index b56b93b..9135a9e 100644 --- a/boudin.scm +++ b/boudin.scm @@ -11,6 +11,8 @@ (chicken pathname) (chicken process-context)) +;; State variables + (define site-posts (make-parameter '())) @@ -28,9 +30,6 @@ (define (go!) (eprint "Building " (site-name) "...") - (when (file-exists? (site-config)) - (with-progress (string-append "Config found, loading: " (site-config)) - (lambda () (load (site-config))))) (for-each (lambda (f) (with-progress (string-append "Copying " f " to " (site-output)) (lambda () (copy-static f)))) (site-files)) @@ -52,7 +51,9 @@ (let loop ((args args)) (cond ((null? args) - (for-each print (site-posts)) + (when (file-exists? (site-config)) + (with-progress (string-append "Loading " (site-config)) + (lambda () (load (site-config))))) (go!)) ;; Configuration file: -c FILE ((equal? (car args) "-c") -- cgit 1.4.1-21-gabe81