aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tw/system/lud.scm15
1 files changed, 13 insertions, 2 deletions
diff --git a/tw/system/lud.scm b/tw/system/lud.scm
index ab484648..7d41eae0 100644
--- a/tw/system/lud.scm
+++ b/tw/system/lud.scm
@@ -131,7 +131,8 @@ that I just want to host somewhere.")
;; See also /gnu/store/...-cgit-1.2.3/lib/cgit/filters/.
(readme ":README.md")
- (extra-options '("readme=:README.org" "readme=:README")) ; alternative readmes
+ (extra-options ; alternative readmes
+ '("readme=:README.org" "readme=:README.html" "readme=:README"))
(about-filter
(program-file "cgit-about-filter"
(with-extensions (list guile-commonmark)
@@ -144,9 +145,19 @@ that I just want to host somewhere.")
(cond
((string-suffix? ".md" file-name)
(sxml->xml (commonmark->sxml)))
+ ((string-suffix? ".html" file-name)
+ (dump-port (current-input-port) (current-output-port)))
(else
(display "<pre>")
- (dump-port (current-input-port) (current-output-port))
+ (do ((ch (read-char) (read-char)))
+ ((eof-object? ch))
+ (case ch
+ ((#\") (display "&quot;"))
+ ((#\') (display "&apos;"))
+ ((#\&) (display "&amp;"))
+ ((#\<) (display "&lt;"))
+ ((#\>) (display "&gt;"))
+ (else => write-char)))
(display "</pre>"))))))))
(nginx