summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2019-06-28 08:26:01 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2019-06-28 08:26:01 -0400
commit794125e408e5da4a0eac1342ba3cf28786b6e904 (patch)
tree135f2c0267b9302f2643e7aef4250bbd915e3281
parentefb1739a69c2dfc9efa9238e3332f50c5ed87b2b (diff)
site: Add scheme field.
* haunt/site.scm (<site>)[scheme]: New field. (site): Add #:scheme keyword argument.
-rw-r--r--haunt/site.scm9
1 files 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 <site>
- (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)