From 0b548398336ba0922c9efe4177528563e4838b4f Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 25 Dec 2022 16:11:38 +0000 Subject: tissue: Deprecate #:web-css configuration parameter. CSS is now specified exclusively through the lexical context of closures in the tissue configuration object. * tissue.scm: Use (tissue web themes default). (%css, %engine): New variables. (tissue-configuration)[#:web-css]: Delete parameter. [#:web-search-renderer]: Pass %css to default theme. [#:web-files]: Pass %engine to gemtext-exporter and skribe-exporter. * tissue/tissue.scm ()[web-css]: Delete field. (tissue-configuration-web-css): Delete function. (tissue-configuration): Remove web-css argument. --- tissue.scm | 16 ++++++++++++---- tissue/tissue.scm | 14 ++------------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/tissue.scm b/tissue.scm index da88795..dc525ca 100644 --- a/tissue.scm +++ b/tissue.scm @@ -1,3 +1,11 @@ +(use-modules (tissue web themes default)) + +(define %css + "/style.css") + +(define %engine + (html-engine #:css %css)) + (tissue-configuration #:project "tissue" #:indexed-documents (append (map (lambda (filename) @@ -11,13 +19,13 @@ (string-append "https://git.systemreboot.net/tissue/commit/?id=" (commit-hash commit)))) (commits-in-current-repository))) - #:web-css "/style.css" + #:web-search-renderer (default-theme #:css %css) #:web-files (cons* (file "index.html" - (skribe-exporter "website/index.skb")) + (skribe-exporter "website/index.skb" #:engine %engine)) (file "style.css" (copier "website/style.css")) (file "manual/dev/en/index.html" - (skribe-exporter "doc/tissue.skb")) + (skribe-exporter "doc/tissue.skb" #:engine %engine)) (append (map (lambda (font-file) (file (string-append "fonts/" font-file) (copier (string-append (getenv "GUIX_ENVIRONMENT") @@ -28,5 +36,5 @@ "IBMPlexMono-Bold-Latin1.woff2")) (filter-map (lambda (filename) (file (replace-extension filename "html") - (gemtext-exporter filename))) + (gemtext-exporter filename #:engine %engine))) (gemtext-files-in-directory "issues"))))) diff --git a/tissue/tissue.scm b/tissue/tissue.scm index fed9fe3..b0c118a 100644 --- a/tissue/tissue.scm +++ b/tissue/tissue.scm @@ -28,19 +28,17 @@ tissue-configuration-project tissue-configuration-aliases tissue-configuration-indexed-documents - tissue-configuration-web-css tissue-configuration-web-search-renderer tissue-configuration-web-files gemtext-files-in-directory)) (define-record-type (make-tissue-configuration project aliases indexed-documents - web-css web-search-renderer web-files) + web-search-renderer web-files) tissue-configuration? (project delayed-tissue-configuration-project) (aliases delayed-tissue-configuration-aliases) (indexed-documents delayed-tissue-configuration-indexed-documents) - (web-css delayed-tissue-configuration-web-css) (web-search-renderer delayed-tissue-configuration-web-search-renderer) (web-files delayed-tissue-configuration-web-files)) @@ -53,9 +51,6 @@ (define tissue-configuration-indexed-documents (compose force delayed-tissue-configuration-indexed-documents)) -(define tissue-configuration-web-css - (compose force delayed-tissue-configuration-web-css)) - (define tissue-configuration-web-search-renderer (compose force delayed-tissue-configuration-web-search-renderer)) @@ -103,7 +98,6 @@ directory they are in." #'(args :::))))))))))))) (define-lazy (tissue-configuration #:key project (aliases '()) (indexed-documents '()) - web-css (web-search-renderer (default-theme)) (web-files '())) "Construct a object. All arguments are @@ -120,10 +114,6 @@ by, the first of which is the canonical name of that author. objects of classes inheriting from @code{}) representing documents to index. -@var{web-css} is the path to a CSS stylesheet. It is relative to the -document root and must begin with a @code{\"/\"}. If it is @code{#f}, -no stylesheet is used in the generated web pages. - @var{web-search-renderer} is a function that accepts two arguments---a @code{} object describing the search page and a @code{} object describing the project. It must @@ -132,4 +122,4 @@ return the rendered SXML. @var{web-files} is a list of @code{} objects representing files to be written to the web output." (make-tissue-configuration project aliases indexed-documents - web-css web-search-renderer web-files)) + web-search-renderer web-files)) -- cgit v1.2.3