summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2025-03-24 23:20:48 +0000
committerArun Isaac2025-03-25 01:05:36 +0000
commit6688ff027f92076be74df2469ae44cb05f1beab5 (patch)
treef78c3db3d7baa963d431a87817aa613744c713d9
parent5481562aa2517829456be1d570b51ed76b6caaf6 (diff)
downloadtissue-6688ff027f92076be74df2469ae44cb05f1beab5.tar.gz
tissue-6688ff027f92076be74df2469ae44cb05f1beab5.tar.lz
tissue-6688ff027f92076be74df2469ae44cb05f1beab5.zip
web: Add head customization to html-engine.
* tissue/web/static.scm (html-engine): Add #:head argument.
-rw-r--r--tissue/web/static.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/tissue/web/static.scm b/tissue/web/static.scm
index ad9849b..f41523a 100644
--- a/tissue/web/static.scm
+++ b/tissue/web/static.scm
@@ -87,16 +87,20 @@ mutate @var{engine}."
               key-value-pairs)
     clone))
 
-(define* (html-engine #:key css)
+(define* (html-engine #:key css head)
   "Return a new HTML engine.
 
 @var{css} is the URI to a CSS stylesheet. If it is @code{#f}, no
-stylesheet is included in the generated web pages."
+stylesheet is included in the generated web pages. @var{head} is a
+string included within the HTML @code{<head>} element."
   (apply engine-custom-set
          (find-engine 'html)
-         (if css
-             `((css . ,(list css)))
-             '())))
+         (append (if css
+                     `((css . ,(list css)))
+                     '())
+                 (if head
+                     `((head . ,head))
+                     '()))))
 
 (define (gemtext-reader)
   "Return a skribilo reader for gemtext."