diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Move syntax highlighting to a Lua source filter
Diffstat (limited to 'cgitrc.5.txt')
-rw-r--r--cgitrc.5.txt12
1 file changed, 7 insertions, 5 deletions
diff --git a/cgitrc.5.txt b/cgitrc.5.txt
index e56cbae..a456ddf 100644
--- a/cgitrc.5.txt
+++ b/cgitrc.5.txt
@@ -474,9 +474,10 @@ source-filter::
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. 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".
+ source-filter is configured, cgit serves the text plain. A ready
+ syntax highlighter using the Scintillua lexer collection ships as
+ extensions/syntax-highlight.lua, see the comments in that file for
+ its dependencies. Default value: none. See also: "FILTER API".
summary-branches::
Specifies the number of branches to display in the repository "summary"
@@ -951,8 +952,9 @@ mimetype.png=image/png
mimetype.svg=image/svg+xml
-# 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.
+# Source code is served plain unless a source-filter is set. The shipped
+# extensions/syntax-highlight.lua highlights through the Scintillua lexers.
+# source-filter=lua:/usr/share/cgit/extensions/syntax-highlight.lua
# Markdown about pages render client-side by default (see enable-markdown).
# For other formats such as manpages, point about-filter at your own script.