summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-07-04 18:19:29 +0530
committerArun Isaac2022-07-04 18:22:36 +0530
commitc1af832f5aac81873e862a2b7908b4bdb29677ed (patch)
tree6868cad917dcbd160cefd25f92544c3e9320f691
parent84e11ed620dec887439060587e277a6fe03c7847 (diff)
downloadtissue-c1af832f5aac81873e862a2b7908b4bdb29677ed.tar.gz
tissue-c1af832f5aac81873e862a2b7908b4bdb29677ed.tar.lz
tissue-c1af832f5aac81873e862a2b7908b4bdb29677ed.zip
web: static: When building website, accept port to log to.
* tissue/web/static.scm (build-website): Accept log-port argument specifying port to log to.
-rw-r--r--tissue/web/static.scm12
1 files changed, 8 insertions, 4 deletions
diff --git a/tissue/web/static.scm b/tissue/web/static.scm
index 4821fca..1937850 100644
--- a/tissue/web/static.scm
+++ b/tissue/web/static.scm
@@ -109,7 +109,8 @@ original current directory."
thunk
(cut chdir previous-current-directory))))
-(define* (build-website repository-top-level output-directory css files)
+(define* (build-website repository-top-level output-directory css files
+ #:key (log-port (current-error-port)))
"Export git repository with REPOSITORY-TOP-LEVEL to OUTPUT-DIRECTORY
as a website.
@@ -121,7 +122,9 @@ issue listings are put. It must begin with a /. If it is #f, per-tag
issue listings are not generated.
FILES is a list of <file> objects representing files to be written to
-the web output."
+the web output.
+
+Log to LOG-PORT. When LOG-PORT is #f, do not log."
;; Set CSS.
(when css
(engine-custom-set! (find-engine 'html) 'css css))
@@ -131,8 +134,9 @@ the web output."
(for-each (lambda (file)
(let ((output-file
(string-append output-directory "/" (file-name file))))
- (display output-file (current-error-port))
- (newline (current-error-port))
+ (when log-port
+ (display output-file log-port)
+ (newline log-port))
(make-directories (dirname output-file))
(call-with-output-file output-file
(lambda (port)