summaryrefslogtreecommitdiff
path: root/tissue.scm
blob: 3054194666b5c6d7392908230c39da712bdeeafa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
(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" "Alexander" "alex")
             ("Arun Isaac" "aruni")
             ("BonfaceKilz" "bonfacem")
             ("Efraim Flashner" "efraimf")
             ("Erik Garrison" "erikg")
             ("Frederick Muriuki Muriithi" "Muriithi Frederick Muriuki" "fredm")
             ("Pjotr Prins" "pjotrp")
             ("Rob Williams" "robw")
             ("acenteno")
             ("jgart")
             ("zsloan"))
 #:web-css "/style.css"
 #:web-files (cons* (file "style.css"
                          (copier "style.css"))
                    (file "index.html"
                          (skribe-exporter "index.skb"))
                    (file "team.html"
                          (skribe-exporter "team.skb"))
                    (append (tag-pages)
                            (filter-map (lambda (filename)
                                          (and (string-suffix? ".gmi" filename)
                                               (not (string=? (basename filename)
                                                              "README.gmi"))
                                               (file (replace-extension filename "html")
                                                     (gemtext-exporter filename
                                                                       (genenetwork-gemtext-reader filename)))))
                                        (git-tracked-files)))))