diff options
Diffstat (limited to '')
-rw-r--r--README.txt72
1 file changed, 47 insertions, 25 deletions
diff --git a/README.txt b/README.txt
index d2eefea..998c072 100644
--- a/README.txt
+++ b/README.txt
@@ -26,12 +26,19 @@ With the Git tree in place, build and install cgit.
$ make
$ sudo make install
-This installs cgit.cgi and cgit.css into /var/www/htdocs/cgit. The location and
-a few other things can be changed by providing a cgit.conf file, see the
-Makefile for details.
+This installs cgit.cgi, cgit.css, cgit.js, cgit.png, favicon.ico and robots.txt
+into /var/www/htdocs/cgit, and the Lua filters from custom/extensions into
+/usr/local/lib/cgit/filters. The locations and a few other things can be changed
+by providing a cgit.conf file, see the Makefile for details.
-The only required library is zlib. cgit builds without OpenSSL or libcurl, so no
-development packages for those are needed.
+The only required library is zlib. cgit builds without OpenSSL, libcurl,
+gettext or Tcl, so no development packages for those are needed.
+
+On a musl system such as Alpine, Git's code also needs the Linux kernel headers,
+packaged there as linux-headers, and its bundled regex in place of musl's, which
+lacks REG_STARTEND. make test takes the same setting.
+
+ $ make NO_REGEX=YesPlease
Lua is optional and only powers the lua: filter extensions, the filters in
custom/extensions/. A plain build auto-detects a Lua through pkg-config,
@@ -40,9 +47,9 @@ pin an implementation, name its pkg-config module.
$ make LUA_PKGCONFIG=lua5.4
-Acceptable LUA_PKGCONFIG values include "luajit", "lua", "lua5.4", "lua5.3",
-"lua5.2" and "lua5.1". To build without Lua, so the binary needs no Lua at
-runtime, turn it off.
+Acceptable LUA_PKGCONFIG values include "luajit", "lua", "lua5.5", "lua5.4",
+"lua5.3", "lua5.2" and "lua5.1". To build without Lua, so the binary needs no
+Lua at runtime, turn it off.
$ make NO_LUA=1
@@ -79,19 +86,23 @@ script added through the css and js options has stable hooks to work with.
carries an aria-label, and the active tab and the current pager link carry
aria-current.
* Every listing is a table.list with a second class naming it, repolist,
- summary, refs, log or tree. Each section of a listing is a tbody named
- repos, branches, tags, log, clone or tree, and each row carries its kind,
- repo, branch, tag, commit, dir, blob, link or mod. A file row's link also
- carries ext- followed by the file extension.
+ summary, refs, log, tree or clone, the last holding the clone urls of an
+ empty repository. Each section of a listing is a tbody named repos,
+ branches, tags, log, clone or tree, and each row carries its kind, repo,
+ branch, tag, commit, dir, blob, link or mod. A file row's link also carries
+ ext- followed by the file extension.
* The commit and tag pages use table.commit-info, the trailer table is
table.commit-trailers, the diffstat is table.diffstat and each file of a diff
is div.file, or tbody.file in the side by side view, with the path in
data-path. The blob and blame pages open with div.blob-header.
-* Ages are time elements with an age-* class and the timestamp in data-ut. Line
- numbers are anchors named n followed by the line.
+* Relative ages are time elements with an age-* class and the timestamp in
+ data-ut, while a date shown in full is a plain time element. Line numbers are
+ anchors named n followed by the line, while enable-tree-linenumbers is on.
* Colours, fonts and metrics are custom properties on div#cgit, so a theme can
- redefine those alone. Every rule in cgit.css starts with div#cgit, and a rule
- of your own needs the same prefix to win.
+ redefine those alone. Every rule in cgit.css starts with div#cgit, apart from
+ the background and margins it sets on html.cgit-standalone, the class of the
+ document cgit writes when it is not embedded. A rule of your own needs the
+ div#cgit prefix to win.
* The script exposes window.cgit.updateAges and window.cgit.highlightLines for
a page that changes the rows or the lines after load.
@@ -124,8 +135,8 @@ and each script's header lists the exact install commands for its own.
pages. Plain text needs only Lua.
* link-commits.lua and link-trailers.lua need nothing beyond Lua itself.
-luaossl has no Lua 5.5 build, so build cgit against 5.1 to 5.4 if you use the
-auth or email filters.
+On Lua 5.5 the auth and email filters need luaossl 20260910 or later, since
+earlier builds fail to load there.
URLs and query parameters
@@ -146,6 +157,11 @@ src/main.c. A repository whose name contains a character that is special in a
url has it percent-encoded, and a plus sign has to be written %2b because a bare
plus decodes to a space.
+A page of the site itself has no repository in front of it, so p names it
+instead, as in ?p=about. These pages are about, which shows root-readme,
+repolist, the index under its own name, login, which an auth filter answers, and
+ls_cache, which lists the cache when enable-cache-list allows it.
+
Every parameter is optional. The pages column names the pages that read each
one, where a value of all marks the few not tied to particular pages.
@@ -153,17 +169,20 @@ one, where a value of all marks the few not tied to particular pages.
| param | pages | description |
+----------+----------------------+--------------------------------------------+
| url | all | repository, page and path in one value |
+| r | all | the repository on its own, in place of url |
+| p | all | the page on its own, in place of url |
| h | all | the branch or ref to read |
| id | all | pin the page to one commit or object |
| id2 | diff patch rawdiff | second object of a diff, paired with id |
-| ofs | index log refs stats | offset into a paged listing |
+| ofs | index log refs | offset into a paged listing |
+| ofs | stats | authors to show, -1 for all of them |
| path | all | restrict the page to one path |
-| q | log | the search term, matched literally |
+| q | index log | the search term, matched literally |
| qt | log | one of grep, author, committer or range |
| s | index | sort key for the listing |
| showmsg | log | show full commit messages |
| period | stats | the statistics window, one of w, m, q or y |
-| dt | diff commit | diff type, unified, side by side or raw |
+| dt | diff commit | 0 unified, 1 side by side or 2 stat only |
| ss | diff commit | shorthand for the side by side diff |
| all | atom | include every ref rather than one branch |
| context | diff commit | lines of context around a diff hunk |
@@ -171,6 +190,9 @@ one, where a value of all marks the few not tied to particular pages.
| follow | log | follow a single path across renames |
+----------+----------------------+--------------------------------------------+
+A number out of range is clamped rather than refused, ofs to 100000 and context
+to 40 lines, and q is cut at 512 characters.
+
A few endpoints are not ordinary pages. The snapshot page takes a filename
rather than a ref, so /demo/snapshot/demo-1.0.tar.gz names both the ref and the
archive format through the suffix, and the formats on offer are set by the
@@ -180,10 +202,10 @@ feed rather than a page and accepts h, path and all. The clone endpoints under
info and objects implement the dumb HTTP protocol and are only present when http
clone is enabled.
-A url fragment can address lines inside a file. The tree and blame pages give
-every line an anchor named n followed by its number, so #n17 jumps to line 17
-and highlights it, and a range written #n17-n24 highlights the whole run and
-scrolls it into view.
+A url fragment can address lines inside a file. While enable-tree-linenumbers is
+on, as it is by default, the tree and blame pages give every line an anchor
+named n followed by its number, so #n17 jumps to line 17 and highlights it, and
+a range written #n17-n24 highlights the whole run and scrolls it into view.
Some worked examples, in the url= form.