diff options
author | Arun Isaac | 2022-12-25 16:11:38 +0000 |
---|---|---|
committer | Arun Isaac | 2022-12-25 23:33:04 +0000 |
commit | 0b548398336ba0922c9efe4177528563e4838b4f (patch) | |
tree | 6183797c58baf759426d3c7166573eaf2b123b71 | |
parent | 806205382950bf3273d18872987b516f30c3d11f (diff) | |
download | tissue-0b548398336ba0922c9efe4177528563e4838b4f.tar.gz tissue-0b548398336ba0922c9efe4177528563e4838b4f.tar.lz tissue-0b548398336ba0922c9efe4177528563e4838b4f.zip |
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 (<tissue-configuration>)[web-css]: Delete field.
(tissue-configuration-web-css): Delete function.
(tissue-configuration): Remove web-css argument.
-rw-r--r-- | tissue.scm | 16 | ||||
-rw-r--r-- | tissue/tissue.scm | 14 |
2 files changed, 14 insertions, 16 deletions
@@ -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 <tissue-configuration> (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 <tissue-configuration> 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{<document>}) 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{<search-page>} object describing the search page and a @code{<tissue-configuration>} object describing the project. It must @@ -132,4 +122,4 @@ return the rendered SXML. @var{web-files} is a list of @code{<file>} 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)) |