diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Hand the about filter the tree url its links need
With nothing below the about page, a readme's relative links have to be written against the tree, and only cgit knows how this site spells the url of a tree page and which ref the readme was read from. Both reach the filter already escaped for a url, built by the same writer as cgit's own links.
Diffstat (limited to 'MANUAL.txt')
-rw-r--r--MANUAL.txt28
1 file changed, 17 insertions, 11 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index 9f6c6f1..6ea6266 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -19,12 +19,13 @@ Global settings
about-filter::
Specifies a command which will be invoked to format the content of about
pages (both top-level and for each repository). The command will get the
- content of the about-file on its stdin, the name of the file as the
- first argument, and the stdout from the command will be included
- verbatim on the about page. Default value: none. When no about-filter is
- set, the readme is escaped and served as plain text. A bundled Lua
- filter, about-render.lua, renders markdown, man pages and plain text
- when about-filter points at it. See also: "Filter API".
+ content of the about-file on its stdin and the name of the file, with
+ the tree url its links resolve against, as arguments, and the stdout
+ from the command will be included verbatim on the about page. Default
+ value: none. When no about-filter is set, the readme is escaped and
+ served as plain text. A bundled Lua filter, about-render.lua, renders
+ markdown, man pages and plain text when about-filter points at it. See
+ also: "Filter API".
age-file::
Specifies a path, relative to each repository path, which can be used to
@@ -794,11 +795,16 @@ specification with one of these strings.
Parameters are provided to filters as follows.
about filter::
- This filter is given a single parameter, the filename of the source file
- to filter. The filter can use the filename to determine (for example)
- the type of syntax to follow when formatting the readme file. The about
- text that is to be filtered is available on standard input and the
- filtered text is expected on standard output.
+ This filter is given three parameters. The first is the filename of the
+ source file to filter, which the filter can use to determine (for
+ example) the type of syntax to follow when formatting the readme file.
+ For a readme tracked in the repository, the second is the url of the
+ repository's tree page at the ref the readme was read from, ending in a
+ slash so a path in the tree can follow it, and the third is the query
+ that has to come after such a path, empty for the default branch. Both
+ are escaped for a url, and both are empty for a readme on disk and for
+ the site readme. The about text that is to be filtered is available on
+ standard input and the filtered text is expected on standard output.
auth filter::
The authentication filter receives 12 parameters, in this order.