diff options
| author | Luke Hoersten <[email protected]> | 2026-04-18 20:55:32 -0500 |
|---|---|---|
| committer | Luke Hoersten <[email protected]> | 2026-04-18 20:55:32 -0500 |
| commit | 2592380207121753a2f64abd9c4fd4b3e99b3c0f (patch) | |
| tree | 3c2971681bfcb7116b209ae025a7f6a1e1de5bf8 /git/web/templates/cgitrc.j2 | |
| parent | eb73ba26e2ef66e38097b784fb3c4621a2991a40 (diff) | |
Make cgit theme configurable via variables, fix owner discovery
Add cgit_css_src, cgit_header_src, cgit_footer_src, cgit_owner variables to
optionally install a custom theme without hardcoding nth.io. Move scan-path
after enable-git-config in cgitrc so gitweb.owner is read from repo git
configs. Switch repo owner loop from find|while to glob for loop to avoid
subshell issues.
Diffstat (limited to 'git/web/templates/cgitrc.j2')
| -rw-r--r-- | git/web/templates/cgitrc.j2 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/git/web/templates/cgitrc.j2 b/git/web/templates/cgitrc.j2 index 76a91d6..6e8df0c 100644 --- a/git/web/templates/cgitrc.j2 +++ b/git/web/templates/cgitrc.j2 @@ -1,12 +1,22 @@ -scan-path={{cgit_scan_path}} remove-suffix=1 virtual-root=/ root-title={{cgit_root_title}} root-desc={{cgit_root_desc}} +{% if cgit_css_src is defined %} +css=/cgit-custom.css +{% endif %} +{% if cgit_header_src is defined %} +header=/etc/cgit/header.html +{% endif %} +{% if cgit_footer_src is defined %} +footer=/etc/cgit/footer.html +{% endif %} + difftype=ssdiff +enable-git-config=1 enable-http-clone=1 enable-index-links=1 enable-log-filecount=1 @@ -14,3 +24,5 @@ enable-log-linecount=1 source-filter=/usr/lib/cgit/filters/syntax-highlighting.py about-filter=/usr/lib/cgit/filters/about-formatting.sh + +scan-path={{cgit_scan_path}} |
