aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-26 13:41:25 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-26 13:41:25 +0300
commit6633589d81213e2c65452825facf4017d2fc4986 (patch)
treeb12a07c597eebff0ff2d7536ecc988027cf22f52
parentworkflows/ci: skip the example config test for PyPI builds (diff)
downloadcgitize-6633589d81213e2c65452825facf4017d2fc4986.tar.gz
cgitize-6633589d81213e2c65452825facf4017d2fc4986.zip
docker: add comments to frontend configuration
-rwxr-xr-xdocker/frontend/cmd.sh3
-rw-r--r--docker/frontend/etc/cgit/cgitrc1
-rw-r--r--docker/frontend/etc/cgit/common3
-rwxr-xr-xdocker/frontend/usr/lib/cgit/filters/html-converters/md2html5
4 files changed, 12 insertions, 0 deletions
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 <style>sheet has been copied from the upstream script.
+
cat <<EOF
<style>
.markdown-body {
@@ -284,6 +286,9 @@ div#cgit .markdown-body h1 a.toclink, div#cgit .markdown-body h2 a.toclink, div#
</style>
EOF
+# Use cmark-gfm, in the vain hope that it will bring the README.md files closer
+# to what GitHub uses.
+
echo "<div class='markdown-body'>"
cmark-gfm --extension table --extension autolink
echo "</div>"