summaryrefslogtreecommitdiff
path: root/cgit/cgitrc
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2020-06-21 14:30:58 +0200
committerJonas Smedegaard <dr@jones.dk>2020-06-21 14:30:58 +0200
commit1ba5e5f144571aa55957ca3c8445a297d598bd92 (patch)
tree18c327fcb3c9916540468f428fcaa5a48afb8337 /cgit/cgitrc
parent2cbc4ce1506989c116ee418c28c7c283627750eb (diff)
(ab)use source filter to parse markdown as html, with line-numbered + highlighted plaintext only as fallback
Diffstat (limited to 'cgit/cgitrc')
-rw-r--r--cgit/cgitrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/cgit/cgitrc b/cgit/cgitrc
index be5b9aa..6542d46 100644
--- a/cgit/cgitrc
+++ b/cgit/cgitrc
@@ -11,7 +11,14 @@ remove-suffix=1
clone-url=git://$HTTP_HOST/$CGIT_REPO_URL user@$HTTP_HOST:$CGIT_REPO_URL https://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL
-source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh
+# (ab)use source filter to parse markdown as html,
+# with line-numbered + highlighted plaintext only as fallback
+# TODO: add anchor to line-numbering:
+# <li style='list-style-type:none'><a id='n2' href='#n2'>2</a>
+# TODO: hide anchor except in :hover mode:
+# <li><a id='n2' href='#n2'>ยง</a>
+enable-tree-linenumbers=0
+source-filter=/etc/local-COMMON/cgit/filters/syntax-highlighting.sh
about-filter=/etc/local-COMMON/cgit/filters/about-formatting.sh
readme=:README.md