summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-03-17 14:26:31 +0530
committerArun Isaac2022-03-18 16:23:28 +0530
commitbce55ba68682545c5f13d00ed9bdf3917c7c4487 (patch)
treec5fe24afa8c234ab9094e160f1a4d7fbd22cfef6
parent87175a77e34e7caeee0db2b245aa846a41bdf8c1 (diff)
downloadtissue-bce55ba68682545c5f13d00ed9bdf3917c7c4487.tar.gz
tissue-bce55ba68682545c5f13d00ed9bdf3917c7c4487.tar.lz
tissue-bce55ba68682545c5f13d00ed9bdf3917c7c4487.zip
web: Parameterize %tags-path when exporting all files.
User-created files might also need %tags-path. So %tags-path should be parameterized even when user-created files are being exported. * tissue/web.scm (build-website): Parameterize %tags-path when exporting all files, not just the auto-generated files.
-rw-r--r--tissue/web.scm76
1 files changed, 38 insertions, 38 deletions
diff --git a/tissue/web.scm b/tissue/web.scm
index a3fccbd..c2acbcd 100644
--- a/tissue/web.scm
+++ b/tissue/web.scm
@@ -232,41 +232,41 @@ issue listings are not generated."
(issues)))
output-file
#:title title)))
- (delete-duplicates (append-map issue-keywords (issues))))))
- ;; Export user-created files.
- (call-with-input-pipe
- (lambda (port)
- (port-transduce
- (tmap (lambda (input-file)
- (unless (string-prefix? "." (basename input-file))
- (let* ((relative-input-file input-file)
- (output-file (string-append output-directory "/"
- (if (or (string-suffix? ".gmi" relative-input-file)
- (string-suffix? ".skb" relative-input-file))
- (replace-extension relative-input-file "html")
- relative-input-file))))
- (display (format "~a -> ~a~%" input-file output-file))
- (mkdir-p (dirname output-file))
- (if (or (string-suffix? ".gmi" input-file)
- (string-suffix? ".skb" input-file))
- (with-output-to-file output-file
- (cut evaluate-document
- ;; Files may be renamed or deleted, but
- ;; not committed. Therefore, raise an
- ;; exception if the file does not exist.
- (if (file-exists? input-file)
- (call-with-input-file input-file
- (cut evaluate-ast-from-port <>
- ;; Relax the gemtext standard
- ;; by joining adjacent lines.
- #:reader (cond
- ((string-suffix? ".gmi" input-file)
- ((reader:make (lookup-reader 'gemtext))
- #:join-lines? #t))
- ((string-suffix? ".skb" input-file)
- ((reader:make (lookup-reader 'skribe)))))))
- (raise (issue-file-not-found-error input-file)))
- (find-engine 'html)))
- (copy-file input-file output-file))))))
- rcons get-line port))
- "git" "ls-files"))
+ (delete-duplicates (append-map issue-keywords (issues)))))
+ ;; Export user-created files.
+ (call-with-input-pipe
+ (lambda (port)
+ (port-transduce
+ (tmap (lambda (input-file)
+ (unless (string-prefix? "." (basename input-file))
+ (let* ((relative-input-file input-file)
+ (output-file (string-append output-directory "/"
+ (if (or (string-suffix? ".gmi" relative-input-file)
+ (string-suffix? ".skb" relative-input-file))
+ (replace-extension relative-input-file "html")
+ relative-input-file))))
+ (display (format "~a -> ~a~%" input-file output-file))
+ (mkdir-p (dirname output-file))
+ (if (or (string-suffix? ".gmi" input-file)
+ (string-suffix? ".skb" input-file))
+ (with-output-to-file output-file
+ (cut evaluate-document
+ ;; Files may be renamed or deleted, but
+ ;; not committed. Therefore, raise an
+ ;; exception if the file does not exist.
+ (if (file-exists? input-file)
+ (call-with-input-file input-file
+ (cut evaluate-ast-from-port <>
+ ;; Relax the gemtext standard
+ ;; by joining adjacent lines.
+ #:reader (cond
+ ((string-suffix? ".gmi" input-file)
+ ((reader:make (lookup-reader 'gemtext))
+ #:join-lines? #t))
+ ((string-suffix? ".skb" input-file)
+ ((reader:make (lookup-reader 'skribe)))))))
+ (raise (issue-file-not-found-error input-file)))
+ (find-engine 'html)))
+ (copy-file input-file output-file))))))
+ rcons get-line port))
+ "git" "ls-files")))