From 7802f85d65b6227cf836b57efd8b84483aa4d877 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Sun, 19 Apr 2026 13:52:04 -0500 Subject: Make cgit source-filter path configurable, add deploy task --- git/web/tasks/main.yaml | 6 ++++++ git/web/templates/cgitrc.j2 | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'git/web') diff --git a/git/web/tasks/main.yaml b/git/web/tasks/main.yaml index 1d07e2f..1e44ea6 100644 --- a/git/web/tasks/main.yaml +++ b/git/web/tasks/main.yaml @@ -20,6 +20,12 @@ file: path="/etc/cgit" state="directory" when: cgit_header_src is defined or cgit_footer_src is defined +- name: install cgit custom source filter + become: yes + copy: src="{{cgit_source_filter_src}}" dest="{{cgit_source_filter_path}}" mode="0755" + when: cgit_source_filter_src is defined + notify: restart fcgiwrap + - name: install cgit custom css become: yes copy: src="{{cgit_css_src}}" dest="/usr/share/cgit/cgit-custom.css" diff --git a/git/web/templates/cgitrc.j2 b/git/web/templates/cgitrc.j2 index 6e8df0c..ccf5c78 100644 --- a/git/web/templates/cgitrc.j2 +++ b/git/web/templates/cgitrc.j2 @@ -22,7 +22,7 @@ enable-index-links=1 enable-log-filecount=1 enable-log-linecount=1 -source-filter=/usr/lib/cgit/filters/syntax-highlighting.py +source-filter={{cgit_source_filter_path | default('/usr/lib/cgit/filters/syntax-highlighting.py')}} about-filter=/usr/lib/cgit/filters/about-formatting.sh scan-path={{cgit_scan_path}} -- cgit v1.2.3