diff options
| author | RATDAD <lambda@disroot.org> | 2025-12-12 01:49:48 -0500 |
|---|---|---|
| committer | RATDAD <lambda@disroot.org> | 2025-12-12 01:49:48 -0500 |
| commit | de8d06726cae205ead43f8b1ac07ecc59a07363b (patch) | |
| tree | 7b7cf48605040f0f07c618c2b78d7aad927249b6 /opt/highlight.sh | |
| parent | 0c7bf0252aa5b9a2c3a3d95ce84370a3d67cb62b (diff) | |
| download | cgit-docker-de8d06726cae205ead43f8b1ac07ecc59a07363b.tar.gz cgit-docker-de8d06726cae205ead43f8b1ac07ecc59a07363b.tar.bz2 cgit-docker-de8d06726cae205ead43f8b1ac07ecc59a07363b.zip | |
Edited README, omitted /cgit.cgi/ from urls, added HTTP Basic Auth
Diffstat (limited to 'opt/highlight.sh')
| -rw-r--r-- | opt/highlight.sh | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/opt/highlight.sh b/opt/highlight.sh index 13e8ae6..d9e0ace 100644 --- a/opt/highlight.sh +++ b/opt/highlight.sh @@ -1,23 +1,25 @@ -## This is for syntax highlighting -# Get the name of the file and the extension of it +# +# +# Syntax Highlighting +# You should mount your own (most likely better) syntax script here. + BASENAME="$1" EXTENSION="${BASENAME##*.}" [ "${BASENAME}" = "${EXTENSION}" ] && EXTENSION=txt [ -z "${EXTENSION}" ] && EXTENSION=txt -# Makefile and Makefile.* are all .mk [ "${BASENAME%%.*}" = "Makefile" ] && EXTENSION=mk -# User note: highlight v2 and v3 have different command options -# -X is replaced by "-O xhtml" in v3 +# User note: highlight v2 and v3 have different command options. +# -X is replaced by "-O xhtml" in v3. # If for whatever reason, this container is using EPEL5 (it shouldn't), -# use the following line instead of the bottom line +# use the following line instead of the bottom line. # exec highlight --force -f -I -X -S "$EXTENSION" 2>/dev/null # EPEL6 version with no inline css # exec highlight --force -f -I -O xhtml -S "EXTENSION" 2>/dev/null -# highlight v3 is available on EPEL6 +# highlight v3 is available on EPEL6. exec highlight --force --inline-css -f -I -O xhtml -S "EXTENSION" 2>/dev/null
\ No newline at end of file |
