diff options
author | Arun Isaac | 2022-04-06 17:15:43 +0530 |
---|---|---|
committer | Arun Isaac | 2022-04-06 17:15:43 +0530 |
commit | 4a0dc15d6a784cc9818a27cd6dea8efec61876a2 (patch) | |
tree | 0e7d0ea14a09db26a6870bc00faf7c5d0d9d3b10 | |
parent | 6e7c6c2fc67c3022e0313f53b2e3ce714bec92d8 (diff) | |
download | gn-gemtext-4a0dc15d6a784cc9818a27cd6dea8efec61876a2.tar.gz |
tissue: Add edit and blame links to issue pages.
* tissue.scm (%github-repo-uri, %repo-branch): New variables.
(genenetwork-gemtext-reader): New function.
(#:web-files): Use genenetwork-gemtext-reader instead of
gemtext-reader.
-rw-r--r-- | tissue.scm | 21 |
1 files changed, 20 insertions, 1 deletions
@@ -1,5 +1,24 @@ (import (tissue tissue)) +(define %github-repo-uri + "https://github.com/genenetwork/gn-gemtext-threads") + +(define %repo-branch + "main") + +(define (genenetwork-gemtext-reader file) + (lambda (port) + (match ((gemtext-reader) port) + ((? eof-object? eof) eof) + (('document body ...) + `(document + (ref #:url ,(string-append %github-repo-uri "/edit/" %repo-branch "/" file) + #:text "Edit this page") + " | " + (ref #:url ,(string-append %github-repo-uri "/blame/" %repo-branch "/" file) + #:text "Blame") + ,@body))))) + (tissue-configuration #:project "GeneNetwork issue tracker" #:aliases '(("Alexander Kabui" "alex") @@ -27,5 +46,5 @@ "README.gmi")) (file (replace-extension filename "html") (gemtext-exporter filename - (gemtext-reader))))) + (genenetwork-gemtext-reader filename))))) (git-tracked-files))))) |