aboutsummaryrefslogtreecommitdiff
path: root/haunt
diff options
context:
space:
mode:
Diffstat (limited to 'haunt')
-rw-r--r--haunt/jakob/builder/blog.scm4
-rw-r--r--haunt/jakob/theme.scm8
2 files changed, 12 insertions, 0 deletions
diff --git a/haunt/jakob/builder/blog.scm b/haunt/jakob/builder/blog.scm
index cf333d6..bea9ed5 100644
--- a/haunt/jakob/builder/blog.scm
+++ b/haunt/jakob/builder/blog.scm
@@ -134,10 +134,14 @@
(define (post->page post)
"Return a Haunt page for POST."
+ (define meta-tags (call-with-input-string (post-ref post 'meta-tags) read))
+ (define scripts (call-with-input-string (post-ref post 'scripts) read))
(make-page (post-uri post)
(theme #:title (post-ref post 'title)
#:description (description-from-post post)
#:keywords (post-ref post 'tags)
+ #:meta (if (not (eof-object? meta-tags)) meta-tags '())
+ #:scripts (if (not (eof-object? scripts)) scripts '())
#:content (render-article post))
sxml->html))
diff --git a/haunt/jakob/theme.scm b/haunt/jakob/theme.scm
index b9a2dc5..2d999f1 100644
--- a/haunt/jakob/theme.scm
+++ b/haunt/jakob/theme.scm
@@ -73,6 +73,8 @@ International")
(title '())
(description "")
(keywords '())
+ (meta '())
+ (scripts '())
(content '(div "")))
"Return an SHTML document using the website's theme."
`((doctype "html")
@@ -97,6 +99,11 @@ International")
(meta (@ (name "og:title") (content ,title)))
+ ,@(map (match-lambda
+ ((name . content)
+ `(meta (@ (name ,name) (content ,content)))))
+ meta)
+
,@(map (lambda (file-name) (stylesheet file-name)) %stylesheets)
,@(map (match-lambda
@@ -107,4 +114,5 @@ International")
(body
,%header
,content
+ ,@scripts
,%footer))))

© 2015 - 2026 Jakob L. Kreuze