From 6633589d81213e2c65452825facf4017d2fc4986 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 26 Mar 2022 13:41:25 +0300 Subject: docker: add comments to frontend configuration --- docker/frontend/cmd.sh | 3 +++ docker/frontend/etc/cgit/cgitrc | 1 + docker/frontend/etc/cgit/common | 3 +++ docker/frontend/usr/lib/cgit/filters/html-converters/md2html | 5 +++++ 4 files changed, 12 insertions(+) (limited to 'docker') diff --git a/docker/frontend/cmd.sh b/docker/frontend/cmd.sh index 4a769f6..0795d4c 100755 --- a/docker/frontend/cmd.sh +++ b/docker/frontend/cmd.sh @@ -2,6 +2,9 @@ set -o errexit -o nounset -o pipefail +# Honestly, I have no idea how this works, I just copy-pasted it from +# somewhere. + spawn-fcgi \ -u nginx \ -g nginx \ diff --git a/docker/frontend/etc/cgit/cgitrc b/docker/frontend/etc/cgit/cgitrc index e12b2f4..55a97bd 100644 --- a/docker/frontend/etc/cgit/cgitrc +++ b/docker/frontend/etc/cgit/cgitrc @@ -1,3 +1,4 @@ +# Always include this (unless you disagree with my choices, of course). include=/etc/cgit/common root-title=My git repositories diff --git a/docker/frontend/etc/cgit/common b/docker/frontend/etc/cgit/common index 4fdf2a5..911b1ed 100644 --- a/docker/frontend/etc/cgit/common +++ b/docker/frontend/etc/cgit/common @@ -23,6 +23,7 @@ max-stats=year remove-suffix=1 snapshots=tar.gz tar.bz2 zip +# Enable Markdown conversion to HTML. about-filter=/usr/lib/cgit/filters/about-formatting.sh readme=:README.md readme=:readme.md @@ -31,6 +32,8 @@ readme=:readme.txt readme=:README readme=:readme +# Enable syntax highlighting. source-filter=/usr/lib/cgit/filters/syntax-highlighting.py +# Set the directory path to search for repositories. scan-path=/mnt/cgitize diff --git a/docker/frontend/usr/lib/cgit/filters/html-converters/md2html b/docker/frontend/usr/lib/cgit/filters/html-converters/md2html index ee3768b..b11f936 100755 --- a/docker/frontend/usr/lib/cgit/filters/html-converters/md2html +++ b/docker/frontend/usr/lib/cgit/filters/html-converters/md2html @@ -1,5 +1,7 @@ #!/usr/bin/env dash +# The EOF +# Use cmark-gfm, in the vain hope that it will bring the README.md files closer +# to what GitHub uses. + echo "
" cmark-gfm --extension table --extension autolink echo "
" -- cgit v1.2.3