From 794125e408e5da4a0eac1342ba3cf28786b6e904 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 28 Jun 2019 08:26:01 -0400 Subject: site: Add scheme field. * haunt/site.scm ()[scheme]: New field. (site): Add #:scheme keyword argument. --- haunt/site.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/haunt/site.scm b/haunt/site.scm index 48573e2..09f6bd7 100644 --- a/haunt/site.scm +++ b/haunt/site.scm @@ -37,6 +37,7 @@ site? site-title site-domain + site-scheme site-posts-directory site-file-filter site-build-directory @@ -51,11 +52,12 @@ default-file-filter)) (define-record-type - (make-site title domain posts-directory file-filter build-directory + (make-site title domain scheme posts-directory file-filter build-directory default-metadata make-slug readers builders) site? (title site-title) (domain site-domain) + (scheme site-scheme) ; https or http (posts-directory site-posts-directory) (file-filter site-file-filter) (build-directory site-build-directory) @@ -67,6 +69,7 @@ (define* (site #:key (title "This Place is Haunted") (domain "example.com") + (scheme 'https) (posts-directory "posts") (file-filter default-file-filter) (build-directory "site") @@ -77,6 +80,8 @@ "Create a new site object. All arguments are optional: TITLE: The name of the site +DOMAIN: The domain that will host the site +SCHEME: Either 'https' or 'http' ('https' by default) POSTS-DIRECTORY: The directory where posts are found FILE-FILTER: A predicate procedure that returns #f when a post file should be ignored, and #f otherwise. Emacs temp files are ignored by @@ -87,7 +92,7 @@ whose keys are symbols MAKE-SLUG: A procedure generating a file name slug from a post READERS: A list of reader objects for processing posts BUILDERS: A list of procedures for building pages from posts" - (make-site title domain posts-directory file-filter build-directory + (make-site title domain scheme posts-directory file-filter build-directory default-metadata make-slug readers builders)) (define (site-post-slug site post) -- cgit v1.2.3