aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKylie McClain <kylie@somas.is>2020-06-29 18:51:38 -0400
committerKylie McClain <kylie@somas.is>2020-06-29 18:59:12 -0400
commit909be364ce750adde9c8853bbe3131758a79fee6 (patch)
tree7adb3e67cc8daf5d475ea397cdc648218c5c523c
parentab3817dd4d824baa612a6752a42cfca98ef54dae (diff)
downloadgitolite-admin-909be364ce750adde9c8853bbe3131758a79fee6.tar.gz
gitolite-admin-909be364ce750adde9c8853bbe3131758a79fee6.tar.xz
gitolite-admin-909be364ce750adde9c8853bbe3131758a79fee6.zip
cgit: add markdown filtering+about
-rw-r--r--cgit/cgitrc4
-rwxr-xr-xcgit/filters/about.sh17
2 files changed, 19 insertions, 2 deletions
diff --git a/cgit/cgitrc b/cgit/cgitrc
index e1270e7..af31e3c 100644
--- a/cgit/cgitrc
+++ b/cgit/cgitrc
@@ -24,6 +24,10 @@ snapshots=tar.xz tar.gz zip
remove-suffix=1
about-filter=/srv/git/.gitolite/cgit/filters/about.sh
+readme=:README.markdown
+readme=:README.mkd
+readme=:README.md
+readme=:README.asciidoc
readme=:README.adoc
readme=:README
diff --git a/cgit/filters/about.sh b/cgit/filters/about.sh
index 9c26ca6..cee846f 100755
--- a/cgit/filters/about.sh
+++ b/cgit/filters/about.sh
@@ -7,8 +7,21 @@ case "$(printf '%s' "${1}" | tr '[:upper:]' '[:lower:]')" in
-b html5 \
-a source-highlighter=pygments \
-e \
- - -o -
- ;;
+ -o - \
+ -
+ ;;
+ *.md|*.mkd|*.markdown)
+ exec cmark-gfm \
+ -t html \
+ --width 0 \
+ --smart \
+ -e footnotes \
+ -e table \
+ -e strikethrough \
+ -e autolink \
+ -e tagfilter \
+ -e tasklist
+ ;;
*)
exec /usr/lib/cgit/filters/html-converters/txt2html
;;