Skip to content

Commit 86028d0

Browse files
committed
try custom edits to syntax-highlighting from cgit
1 parent 5bf709f commit 86028d0

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

cgit/Dockerfile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
FROM alpine:latest
44

55
RUN set -xe && \
6-
apk add --no-cache --purge -uU \
7-
curl git cgit highlight py3-pygments python3 py3-markdown markdown \
8-
libzip libcrypto3 libssl3 \
9-
fcgiwrap spawn-fcgi nginx gettext dumb-init && \
10-
rm -rf /var/cache/apk/* /tmp/* && \
11-
mkdir -p /srv/git
6+
apk add --no-cache --purge -uU \
7+
curl git cgit highlight python3 py3-markdown markdown \
8+
libzip libcrypto3 libssl3 \
9+
fcgiwrap spawn-fcgi nginx gettext dumb-init && \
10+
rm -rf /var/cache/apk/* /tmp/* && \
11+
mkdir -p /srv/git && \
12+
sed -i '118 s/^/#/' /usr/lib/cgit/filters/syntax-highlighting.sh && \
13+
echo 'exec highlight --force --inline-css -f -I -O xhtml -S "$EXTENSION" 2>/dev/null' >> /usr/lib/cgit/filters/syntax-highlighting.sh
1214

1315
ENV ROOT_TITLE="Git" \
1416
ROOT_DESC="My git repositories" \

cgit/cgitrc.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ root-title=$ROOT_TITLE
77
root-desc=$ROOT_DESC
88
root-readme=$ROOT_README
99

10-
# Fast syntax highlighting optimized for cgit
1110
source-filter=/usr/lib/cgit/filters/syntax-highlighting.sh
1211
about-filter=/usr/lib/cgit/filters/about-formatting.sh
1312

0 commit comments

Comments
 (0)