From 97e38895c33c812b918fb5a24fd7b72a45af7cbf Mon Sep 17 00:00:00 2001 From: romain Date: Sat, 27 Aug 2022 12:46:20 +0200 Subject: [PATCH 1/2] added syntax highlighting feature --- Dockerfile | 1 + src/entrypoint.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index 197c110..0997a53 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,6 +43,7 @@ RUN chmod +x /usr/bin/rmauth # manage default value ENV GITUSER gituser ENV GITPASSWORD gitpassword +ENV GITHIGHLIGHT 0 # add ihm mdl ENV IHM no-mdl diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 07a910a..8ca0efd 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -30,6 +30,11 @@ if [ "$1" = 'app' ]; then cat /usr/share/gitweb/ihm/headstring.conf >> /etc/gitweb.conf cp /usr/share/gitweb/ihm/gitweb.css /usr/share/gitweb/static/gitweb.css fi + if [ "$GITHIGHLIGHT" = "1" ]; then + echo '' >> /etc/gitweb.conf + echo '# enable syntax highlighting' >> /etc/gitweb.conf + echo "\$feature{'highlight'}{'default'} = [1];" >> /etc/gitweb.conf + fi service fcgiwrap start nginx -g "daemon off;" /bin/run-parts --verbose --regex '\.(sh)$' "/usr/share/gitweb/docker-entrypoint.post" From 2db1cfefbcbfbacc0155eadf92461b618b6788e8 Mon Sep 17 00:00:00 2001 From: romain Date: Sat, 27 Aug 2022 20:10:23 +0200 Subject: [PATCH 2/2] document new GITHIGHLIGHT option --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4bf9dbc..c5e8089 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ load when start image load file in - GITPROJECT - GITUSER (default gituser) - GITPASSWORD (default gitpassword) +- GITHIGHLIGHT (default `0`) - IHM (default "") ## Volume