diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Add built-in syntax highlighting
Highlighting previously required a source filter shelling out to something like Pygments. A configured source filter still takes precedence, every character is preserved so the line gutter stays aligned, and large files are skipped.
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt10
1 file changed, 6 insertions, 4 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index 7a3e48a..fd420f1 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -438,8 +438,10 @@ source-filter::
in the tree view. The command will get the blob content on its STDIN
and the name of the blob as its only command line argument. The STDOUT
from the command will be included verbatim as the blob contents, i.e.
- this can be used to implement e.g. syntax highlighting. Default value:
- none. See also: "FILTER API".
+ this can be used to implement e.g. syntax highlighting. When no
+ source-filter is configured, cgit highlights common languages in the
+ browser with the bundled cgit.js, so a filter is only needed to
+ override that. Default value: none. See also: "FILTER API".
summary-branches::
Specifies the number of branches to display in the repository "summary"
@@ -913,8 +915,8 @@ mimetype.png=image/png
mimetype.svg=image/svg+xml
-# Highlight source code with python pygments-based highlighter
-source-filter=/var/www/cgit/filters/syntax-highlighting.py
+# Source code is highlighted in the browser by the bundled cgit.js, so no
+# source-filter is needed here. Set one only to override that.
# Format markdown, restructuredtext, manpages, text files, and html files
# through the right converters