From 09631f5ed55f51b686814a31340c2fa80ac48b3d Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Mon, 14 Jun 2021 19:38:46 -0400 Subject: Add a license tab This tab is nearly identical to the about tab, use the license field in cgitrc to set a list of files to check for or use repo.license or cgit.license as a git-config key. --- cgitrc.5.txt | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'cgitrc.5.txt') diff --git a/cgitrc.5.txt b/cgitrc.5.txt index 33a6a8c..5a0e422 100644 --- a/cgitrc.5.txt +++ b/cgitrc.5.txt @@ -331,6 +331,12 @@ readme:: in this list. This is useful in conjunction with scan-path. Default value: none. See also: scan-path, repo.readme. +license:: + Text which will be used as default value for "repo.license". Multiple + config keys may be specified, and cgit will use the first found file + in this list. This is useful in conjunction with scan-path. Default + value: none. See also: scan-path, repo.license. + remove-suffix:: If set to "1" and scan-path is enabled, if any repositories are found with a suffix of ".git", this suffix will be removed for the url and @@ -585,6 +591,17 @@ repo.readme:: are no non-public files located in the same directory as the readme file. Default value: . +repo.license:: + A path (relative to ) which specifies a file to include + verbatim as the "license" page for this repo. You may also specify a + git refspec by head or by hash by prepending the refspec followed by + a colon. For example, "master:LICENSE". If the value begins + with a colon, i.e. ":COPYING", the default branch of the + repository will be used. Sharing any file will expose that entire + directory tree to the "/license/PATH" endpoints, so be sure that there + are no non-public files located in the same directory as the license + file. Default value: . + repo.section:: Override the current section name for this repository. Default value: none. @@ -669,7 +686,7 @@ 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. + example) the type of syntax to follow when formatting the readme/license file. The about text that is to be filtered is available on standard input and the filtered text is expected on standard output. @@ -930,6 +947,10 @@ readme=:install.txt readme=:INSTALL readme=:install +license=:LICENSE.md +license=:LICENSE +license=:COPYING.md +license=:COPYING ## ## List of repositories. @@ -946,6 +967,7 @@ repo.path=/pub/git/foo.git repo.desc=the master foo repository repo.owner=fooman@example.com repo.readme=info/web/about.html +repo.license=GPLv3.html repo.url=bar -- cgit v1.2.3-56-ge451