about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-21T02·59+0000
committerVincent Ambo <tazjin@google.com>2019-12-21T03·01+0000
commitbec4eb23d0b00eb76dd3fa50386a0be5f0b739a4 (patch)
treeeb858fd2315d18efd58921ecddb3505525bc1c27
parent19ced1ac4157210ebd613f3c52a46004e3a517aa (diff)
feat(cgit-taz): Use pulldown-cmark as the about filter r/274
It renders GitHub-flavoured Markdown, which is nice for most
use-cases.
-rw-r--r--third_party/default.nix1
-rw-r--r--web/cgit-taz/default.nix8
2 files changed, 7 insertions, 2 deletions
diff --git a/third_party/default.nix b/third_party/default.nix
index f7bd07031e82..afe05ccb52b5 100644
--- a/third_party/default.nix
+++ b/third_party/default.nix
@@ -84,6 +84,7 @@ let
       texlive
       thttpd
       tree
+      writeShellScript
       writeShellScriptBin
       writeText
       writeTextFile
diff --git a/web/cgit-taz/default.nix b/web/cgit-taz/default.nix
index 314282caa1d5..fbb4cd9bc204 100644
--- a/web/cgit-taz/default.nix
+++ b/web/cgit-taz/default.nix
@@ -15,13 +15,17 @@ let
     patches = old.patches ++ [ ./cgit_depot_url.patch ];
   });
 
+  cmarkFilter = writeShellScript "pulldown-cmark-filter.sh" ''
+    exec ${pulldown-cmark}/bin/pulldown-cmark -TFSL
+  '';
+
   cgitConfig = writeText "cgitrc" ''
     # Global configuration
     virtual-root=/
     enable-http-clone=1
     readme=:README.md
-    about-filter=${monocgit}/lib/cgit/filters/about-formatting.sh
-    source-filter=${monocgit}/lib//cgit/filters/syntax-highlighting.py
+    about-filter=${cmarkFilter}
+    source-filter=${monocgit}/lib/cgit/filters/syntax-highlighting.py
     enable-log-filecount=1
     enable-log-linecount=1
     enable-follow-links=1