From 325ecc79340d10d436c35785ebc20cd670d9cb15 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 11 Apr 2015 22:46:08 -0400 Subject: site: Add 'domain' field. * haunt/site.scm (): Add 'domain' field. (make-site): New argument. (site-domain): New accessor. (site): Add 'domain' keyword argument. --- haunt/site.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/haunt/site.scm b/haunt/site.scm index 23bc6d4..92146e8 100644 --- a/haunt/site.scm +++ b/haunt/site.scm @@ -31,6 +31,7 @@ #:export (site site? site-title + site-domain site-posts-directory site-build-directory site-default-metadata @@ -39,10 +40,11 @@ build-site)) (define-record-type - (make-site title posts-directory build-directory default-metadata - readers builders) + (make-site title domain posts-directory build-directory + default-metadata readers builders) site? (title site-title) + (domain site-domain) (posts-directory site-posts-directory) (build-directory site-build-directory) (default-metadata site-default-metadata) @@ -51,6 +53,7 @@ (define* (site #:key (title "This Place is Haunted") + (domain "example.com") (posts-directory "posts") (build-directory "site") (default-metadata '()) @@ -65,7 +68,7 @@ DEFAULT-METADATA: An alist of arbitrary default metadata for posts whose keys are symbols READERS: A list of reader objects for processing posts BUILDERS: A list of procedures for building pages from posts" - (make-site title posts-directory build-directory + (make-site title domain posts-directory build-directory default-metadata readers builders)) (define (build-site site) -- cgit v1.2.3