From 6688ff027f92076be74df2469ae44cb05f1beab5 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 24 Mar 2025 23:20:48 +0000 Subject: web: Add head customization to html-engine. * tissue/web/static.scm (html-engine): Add #:head argument. --- tissue/web/static.scm | 14 +++++++++----- 1 file 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{} 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." -- cgit v1.2.3