summary refs log tree commit diff
path: root/tissue.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tissue.scm')
-rw-r--r--tissue.scm48
1 files changed, 40 insertions, 8 deletions
diff --git a/tissue.scm b/tissue.scm
index f069c1e..414acad 100644
--- a/tissue.scm
+++ b/tissue.scm
@@ -1,21 +1,48 @@
+(use-modules (tissue skribilo)
+             (tissue web themes default))
+
+;; Add current directory to load path so that (doc skribilo) can be
+;; found when indexing doc/tissue.skb.
+(add-to-load-path (dirname (current-filename)))
+
+(define %css
+  "/tissue/style.css")
+
+(define %engine
+  (html-engine #:css %css))
+
 (tissue-configuration
- #:project "tissue"
  #:indexed-documents (append (map (lambda (filename)
                                     (slot-set (read-gemtext-issue filename)
                                               'web-uri
-                                              (string-append "/" (string-remove-suffix ".gmi" filename))))
+                                              (string-append "/tissue/"
+                                                             (string-remove-suffix ".gmi" filename))))
                                   (gemtext-files-in-directory "issues"))
+                             (map (lambda (identifier)
+                                    (slot-set (document-fragment "doc/tissue.skb" identifier)
+                                              'web-uri
+                                              (string-append "/manual/dev/en/#"
+                                                             identifier)))
+                                  (list "chapter-introduction"
+                                        "chapter-tutorial"
+                                        "chapter-gemtext-markup"
+                                        "section-constructors"
+                                        "section-reader-functions"
+                                        "section-writer-functions"
+                                        "section-utility-functions"))
                              (map (lambda (commit)
                                     (slot-set commit
                                               'web-uri
                                               (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" #:engine %engine))
                     (append (map (lambda (font-file)
                                    (file (string-append "fonts/" font-file)
                                          (copier (string-append (getenv "GUIX_ENVIRONMENT")
@@ -24,7 +51,12 @@
                                        "IBMPlexSans-Bold-Latin1.woff2"
                                        "IBMPlexMono-Regular-Latin1.woff2"
                                        "IBMPlexMono-Bold-Latin1.woff2"))
-                            (filter-map (lambda (filename)
-                                          (file (replace-extension filename "html")
-                                                (gemtext-exporter filename)))
-                                        (gemtext-files-in-directory "issues")))))
+                            (filter-map (lambda (release-file)
+                                          (and (string-prefix? "website/releases/" release-file)
+                                               (file (string-append "releases/" (basename release-file))
+                                                     (copier release-file))))
+                                        (git-tracked-files (current-git-repository)))
+                            (map (lambda (filename)
+                                   (file (replace-extension filename "html")
+                                         (gemtext-exporter filename #:engine %engine)))
+                                 (gemtext-files-in-directory "issues")))))