aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--cgitrc1
-rwxr-xr-xfilters/syntax-highlighting.sh4
3 files changed, 4 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 033f8fe..f6317ce 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,7 +18,7 @@ FROM alpine:latest AS runtime
COPY --from=builder /var/www/htdocs/cgit /usr/share/webapps/cgit
COPY ./filters /usr/lib/cgit/filters
-RUN apk --no-cache add lighttpd python3 lua5.4 py3-markdown
+RUN apk --no-cache add lighttpd python3 lua5.4 py3-markdown py3-pygments highlight
COPY lighttpd.conf /etc/lighttpd/lighttpd.conf
COPY cgitrc /etc/cgitrc
diff --git a/cgitrc b/cgitrc
index 4a41c0a..20d0ed0 100644
--- a/cgitrc
+++ b/cgitrc
@@ -76,6 +76,7 @@ side-by-side-diffs=0
# needs python-pygments
# source-filter=/usr/lib/cgit/filters/syntax-highlighting.py
+source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh
# Format markdown, restructuredtext, manpages, text files, and html files through the right converters
about-filter=/usr/lib/cgit/filters/about-formatting.sh
diff --git a/filters/syntax-highlighting.sh b/filters/syntax-highlighting.sh
index 840bc34..5033f58 100755
--- a/filters/syntax-highlighting.sh
+++ b/filters/syntax-highlighting.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 -f -I -O xhtml -S "$EXTENSION" 2>/dev/null