summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiao Pan <gky44px1999@gmail.com>2024-02-25 03:37:01 +0000
committerXiao Pan <gky44px1999@gmail.com>2024-02-25 03:37:01 +0000
commit90926642b0231002e2b2a1a5e18c10d0f8e8ccea (patch)
tree8577e48d121a8c7efa6a419ebd41db86cddc31b3
parenta1a47075a21075884890c52fff0e0d85b2f8dd62 (diff)
try cgit highlight
-rw-r--r--etc/cgitrc2
-rwxr-xr-xusr/lib/cgit/filters/syntax-highlighting-edited.sh4
2 files changed, 4 insertions, 2 deletions
diff --git a/etc/cgitrc b/etc/cgitrc
index 86b26dd4..416ecf76 100644
--- a/etc/cgitrc
+++ b/etc/cgitrc
@@ -5,6 +5,8 @@
# https://stackoverflow.com/questions/16182421/cgit-and-nginx-url-rewrite
virtual-root=/
+source-filter=/usr/lib/cgit/filters/syntax-highlighting-edited.sh
+
root-title=flylightning.xyz git repositories
root-desc=
diff --git a/usr/lib/cgit/filters/syntax-highlighting-edited.sh b/usr/lib/cgit/filters/syntax-highlighting-edited.sh
index 840bc34f..3de95fa5 100755
--- a/usr/lib/cgit/filters/syntax-highlighting-edited.sh
+++ b/usr/lib/cgit/filters/syntax-highlighting-edited.sh
@@ -115,7 +115,7 @@ EXTENSION="${BASENAME##*.}"
# found (for example) on EPEL 6.
#
# This is for version 2
-exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
+#exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null
# This is for version 3
-#exec highlight --force -f -I -O xhtml -S "$EXTENSION" 2>/dev/null
+exec highlight --force --inline-css -f -I -O xhtml -S "$EXTENSION" 2>/dev/null