Cgit syntax highlighting

From: Alexey Vyskubov <alexey_at_pentode.fi>
Date: Wed, 25 Sep 2024 07:41:04 UTC
Hello,

I wonder what am I doing wrong. On FreeBSD 14.1-p5 I have installed cgit-1.2.3_1
and it works, except I am getting no source highlighting.

My /usr/local/etc/cgitrc follows (unlike documentation says, it is not
/etc/cgitrc; I have filled bug #281513):

css=/cgit-assets/cgit.css
favicon=/cgit-assets/favicon.ico
logo=/cgit-assets/cgit.png
scan-path=/Storage/git/
source-filter=/usr/local/lib/cgit/filters/syntax-highlighting.py

I am using caddy as a web server; the relevant part of the Caddyfile is

    handle_path /cgit-assets/* {
        root * /usr/local/www/cgit
        file_server
    }
    handle {
        reverse_proxy unix//var/run/fcgiwrap/fcgiwrap.sock {
            transport fastcgi {
                env DOCUMENT_ROOT /usr/local/lib/cgit/
                env SCRIPT_FILENAME /usr/local/www/cgit/cgit.cgi
            }
        }
    }

As said, everything works but the syntax highlighting. I have pygments
installed, and running 

/usr/local/lib/cgit/filters/syntax-highlighting.py foo.py
<some Python code>

provides something with code highlighting, but if I look at the source
code of the page for the file it is not there (and the file is displayed
without the highlighting, of course).

I have found somewhere the instruction to add
mimetype.gitblob+py=text/x-python to cgitrc, but it does not help.

What should I do differently?

P.S. I have tried non-Python approach with syntax-highliting.sh getting the
same result. Moreover, if I put in source-filter some shell script which
just leaves mark in /tmp, it seems that it is never called.

-- 
Alexey
I cannot receive HTML mail at this account.
Hi, I am a signature virus. Add me to your signature to help me spread.