Loui Chang | 676d17b | 2009-09-14 01:21:10 -0400 | [diff] [blame] | 1 | :man source: cgit |
| 2 | :man manual: cgit |
| 3 | |
Matt McCormick (thewtex) | 9f9ede3 | 2009-02-11 23:06:05 -0600 | [diff] [blame] | 4 | CGITRC(5) |
| 5 | ======== |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 6 | |
| 7 | |
| 8 | NAME |
| 9 | ---- |
Lars Hjemli | c54f8a5 | 2009-02-12 10:12:05 +0100 | [diff] [blame] | 10 | cgitrc - runtime configuration for cgit |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 11 | |
| 12 | |
Matt McCormick (thewtex) | 9f9ede3 | 2009-02-11 23:06:05 -0600 | [diff] [blame] | 13 | SYNOPSIS |
| 14 | -------- |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 15 | Cgitrc contains all runtime settings for cgit, including the list of git |
| 16 | repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank |
| 17 | lines, and lines starting with '#', are ignored. |
| 18 | |
| 19 | |
Lars Hjemli | fcc6056 | 2009-08-10 18:58:29 +0200 | [diff] [blame] | 20 | LOCATION |
| 21 | -------- |
| 22 | The default location of cgitrc, defined at compile time, is /etc/cgitrc. At |
| 23 | runtime, cgit will consult the environment variable CGIT_CONFIG and, if |
| 24 | defined, use its value instead. |
| 25 | |
| 26 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 27 | GLOBAL SETTINGS |
| 28 | --------------- |
Lars Hjemli | 537c05f | 2009-08-09 13:27:21 +0200 | [diff] [blame] | 29 | about-filter:: |
| 30 | Specifies a command which will be invoked to format the content of |
| 31 | about pages (both top-level and for each repository). The command will |
Jason A. Donenfeld | 2a1ead3 | 2013-05-25 20:30:57 +0200 | [diff] [blame] | 32 | get the content of the about-file on its STDIN, the name of the file |
| 33 | as the first argument, and the STDOUT from the command will be |
| 34 | included verbatim on the about page. Default value: none. See |
| 35 | also: "FILTER API". |
Lars Hjemli | 537c05f | 2009-08-09 13:27:21 +0200 | [diff] [blame] | 36 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 37 | agefile:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 38 | Specifies a path, relative to each repository path, which can be used |
| 39 | to specify the date and time of the youngest commit in the repository. |
| 40 | The first line in the file is used as input to the "parse_date" |
| 41 | function in libgit. Recommended timestamp-format is "yyyy-mm-dd |
Christian Hesse | 820df9c | 2013-07-22 09:13:39 +0200 | [diff] [blame] | 42 | hh:mm:ss". You may want to generate this file from a post-receive |
| 43 | hook. Default value: "info/web/last-modified". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 44 | |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 45 | auth-filter:: |
| 46 | Specifies a command that will be invoked for authenticating repository |
| 47 | access. Receives quite a few arguments, and data on both stdin and |
| 48 | stdout for authentication processing. Details follow later in this |
| 49 | document. If no auth-filter is specified, no authentication is |
| 50 | performed. Default value: none. See also: "FILTER API". |
| 51 | |
Jason A. Donenfeld | 389cc17 | 2013-04-08 16:57:12 +0200 | [diff] [blame] | 52 | branch-sort:: |
| 53 | Flag which, when set to "age", enables date ordering in the branch ref |
| 54 | list, and when set to "name" enables ordering by branch name. Default |
| 55 | value: "name". |
| 56 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 57 | cache-about-ttl:: |
Jason A. Donenfeld | 61ff100 | 2013-05-28 16:33:30 +0200 | [diff] [blame] | 58 | Number which specifies the time-to-live, in minutes, for the cached |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 59 | version of the repository about page. See also: "CACHE". Default |
| 60 | value: "15". |
Jason A. Donenfeld | 61ff100 | 2013-05-28 16:33:30 +0200 | [diff] [blame] | 61 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 62 | cache-dynamic-ttl:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 63 | Number which specifies the time-to-live, in minutes, for the cached |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 64 | version of repository pages accessed without a fixed SHA1. See also: |
| 65 | "CACHE". Default value: "5". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 66 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 67 | cache-repo-ttl:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 68 | Number which specifies the time-to-live, in minutes, for the cached |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 69 | version of the repository summary page. See also: "CACHE". Default |
| 70 | value: "5". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 71 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 72 | cache-root:: |
| 73 | Path used to store the cgit cache entries. Default value: |
| 74 | "/var/cache/cgit". See also: "MACRO EXPANSION". |
| 75 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 76 | cache-root-ttl:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 77 | Number which specifies the time-to-live, in minutes, for the cached |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 78 | version of the repository index page. See also: "CACHE". Default |
| 79 | value: "5". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 80 | |
Lars Hjemli | b4dc93d | 2009-08-20 17:42:14 +0200 | [diff] [blame] | 81 | cache-scanrc-ttl:: |
| 82 | Number which specifies the time-to-live, in minutes, for the result |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 83 | of scanning a path for git repositories. See also: "CACHE". Default |
| 84 | value: "15". |
Jason A. Donenfeld | 61ff100 | 2013-05-28 16:33:30 +0200 | [diff] [blame] | 85 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 86 | case-sensitive-sort:: |
| 87 | Sort items in the repo list case sensitively. Default value: "1". |
| 88 | See also: repository-sort, section-sort. |
Lukas Fleischer | a3722ec | 2014-02-05 10:23:58 +0100 | [diff] [blame] | 89 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 90 | cache-size:: |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 91 | The maximum number of entries in the cgit cache. When set to "0", |
| 92 | caching is disabled. See also: "CACHE". Default value: "0" |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 93 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 94 | cache-snapshot-ttl:: |
| 95 | Number which specifies the time-to-live, in minutes, for the cached |
| 96 | version of snapshots. See also: "CACHE". Default value: "5". |
| 97 | |
| 98 | cache-static-ttl:: |
| 99 | Number which specifies the time-to-live, in minutes, for the cached |
| 100 | version of repository pages accessed with a fixed SHA1. See also: |
| 101 | "CACHE". Default value: -1". |
Jason A. Donenfeld | 184c565 | 2012-07-12 19:13:39 +0200 | [diff] [blame] | 102 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 103 | clone-prefix:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 104 | Space-separated list of common prefixes which, when combined with a |
| 105 | repository url, generates valid clone urls for the repository. This |
| 106 | setting is only used if `repo.clone-url` is unspecified. Default value: |
| 107 | none. |
| 108 | |
Lars Hjemli | a1429db | 2011-06-06 20:49:13 +0000 | [diff] [blame] | 109 | clone-url:: |
| 110 | Space-separated list of clone-url templates. This setting is only |
| 111 | used if `repo.clone-url` is unspecified. Default value: none. See |
| 112 | also: "MACRO EXPANSION", "FILTER API". |
| 113 | |
Lars Hjemli | f35db1c | 2009-07-31 17:42:57 +0200 | [diff] [blame] | 114 | commit-filter:: |
| 115 | Specifies a command which will be invoked to format commit messages. |
| 116 | The command will get the message on its STDIN, and the STDOUT from the |
| 117 | command will be included verbatim as the commit message, i.e. this can |
| 118 | be used to implement bugtracker integration. Default value: none. |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 119 | See also: "FILTER API". |
Lars Hjemli | f35db1c | 2009-07-31 17:42:57 +0200 | [diff] [blame] | 120 | |
Jason A. Donenfeld | 389cc17 | 2013-04-08 16:57:12 +0200 | [diff] [blame] | 121 | commit-sort:: |
| 122 | Flag which, when set to "date", enables strict date ordering in the |
| 123 | commit log, and when set to "topo" enables strict topological |
| 124 | ordering. If unset, the default ordering of "git log" is used. Default |
| 125 | value: unset. |
| 126 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 127 | css:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 128 | Url which specifies the css document to include in all cgit pages. |
| 129 | Default value: "/cgit.css". |
| 130 | |
Jason A. Donenfeld | a5e1553 | 2014-01-13 04:04:52 +0100 | [diff] [blame] | 131 | email-filter:: |
| 132 | Specifies a command which will be invoked to format names and email |
| 133 | address of committers, authors, and taggers, as represented in various |
| 134 | places throughout the cgit interface. This command will receive an |
Jason A. Donenfeld | 786609b | 2014-01-13 16:24:40 +0100 | [diff] [blame] | 135 | email address and an origin page string as its command line arguments, |
| 136 | and the text to format on STDIN. It is to write the formatted text back |
| 137 | out onto STDOUT. Default value: none. See also: "FILTER API". |
Jason A. Donenfeld | a5e1553 | 2014-01-13 04:04:52 +0100 | [diff] [blame] | 138 | |
Lars Hjemli | 286a905 | 2009-07-25 12:29:22 +0200 | [diff] [blame] | 139 | embedded:: |
Lars Hjemli | 86b753c | 2009-07-25 12:23:30 +0200 | [diff] [blame] | 140 | Flag which, when set to "1", will make cgit generate a html fragment |
| 141 | suitable for embedding in other html pages. Default value: none. See |
| 142 | also: "noheader". |
Johan Herland | 9a8d39c | 2010-11-15 18:39:50 +0100 | [diff] [blame] | 143 | |
Jeff Smith | c1cd290 | 2017-10-01 23:39:08 -0500 | [diff] [blame] | 144 | enable-blame:: |
| 145 | Flag which, when set to "1", will allow cgit to provide a "blame" page |
| 146 | for files, and will make it generate links to that page in appropriate |
| 147 | places. Default value: "0". |
| 148 | |
Johan Herland | 9a8d39c | 2010-11-15 18:39:50 +0100 | [diff] [blame] | 149 | enable-commit-graph:: |
| 150 | Flag which, when set to "1", will make cgit print an ASCII-art commit |
| 151 | history graph to the left of the commit messages in the repository |
| 152 | log page. Default value: "0". |
| 153 | |
Lars Hjemli | 2273c2c | 2009-08-24 08:53:21 +0200 | [diff] [blame] | 154 | enable-filter-overrides:: |
| 155 | Flag which, when set to "1", allows all filter settings to be |
| 156 | overridden in repository-specific cgitrc files. Default value: none. |
| 157 | |
John Keeping | 30304d8 | 2015-08-12 15:55:28 +0100 | [diff] [blame] | 158 | enable-follow-links:: |
| 159 | Flag which, when set to "1", allows users to follow a file in the log |
| 160 | view. Default value: "0". |
| 161 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 162 | enable-git-config:: |
| 163 | Flag which, when set to "1", will allow cgit to use git config to set |
| 164 | any repo specific settings. This option is used in conjunction with |
| 165 | "scan-path", and must be defined prior, to augment repo-specific |
| 166 | settings. The keys gitweb.owner, gitweb.category, gitweb.description, |
| 167 | and gitweb.homepage will map to the cgit keys repo.owner, repo.section, |
| 168 | repo.desc, and repo.homepage respectively. All git config keys that begin |
| 169 | with "cgit." will be mapped to the corresponding "repo." key in cgit. |
| 170 | Default value: "0". See also: scan-path, section-from-path. |
| 171 | |
Dan McGee | 4223132 | 2011-01-12 12:06:07 -0600 | [diff] [blame] | 172 | enable-http-clone:: |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 173 | If set to "1", cgit will act as a dumb HTTP endpoint for git clones. |
Přemysl Janouch | 4f6fb32 | 2013-09-11 20:10:14 +0200 | [diff] [blame] | 174 | You can add "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" to clone-url |
| 175 | to expose this feature. If you use an alternate way of serving git |
| 176 | repositories, you may wish to disable this. Default value: "1". |
Dan McGee | 4223132 | 2011-01-12 12:06:07 -0600 | [diff] [blame] | 177 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 178 | enable-html-serving:: |
| 179 | Flag which, when set to "1", will allow the /plain handler to serve |
| 180 | mimetype headers that result in the file being treated as HTML by the |
| 181 | browser. When set to "0", such file types are returned instead as |
| 182 | text/plain or application/octet-stream. Default value: "0". See also: |
| 183 | "repo.enable-html-serving". |
| 184 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 185 | enable-index-links:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 186 | Flag which, when set to "1", will make cgit generate extra links for |
| 187 | each repo in the repository index (specifically, to the "summary", |
| 188 | "commit" and "tree" pages). Default value: "0". |
| 189 | |
Florian Pritz | b1e172a | 2013-02-01 10:59:13 +0100 | [diff] [blame] | 190 | enable-index-owner:: |
| 191 | Flag which, when set to "1", will make cgit display the owner of |
| 192 | each repo in the repository index. Default value: "1". |
| 193 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 194 | enable-log-filecount:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 195 | Flag which, when set to "1", will make cgit print the number of |
| 196 | modified files for each commit on the repository log page. Default |
| 197 | value: "0". |
| 198 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 199 | enable-log-linecount:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 200 | Flag which, when set to "1", will make cgit print the number of added |
| 201 | and removed lines for each commit on the repository log page. Default |
| 202 | value: "0". |
| 203 | |
Lars Hjemli | 41934a3 | 2009-11-07 19:10:58 +0100 | [diff] [blame] | 204 | enable-remote-branches:: |
| 205 | Flag which, when set to "1", will make cgit display remote branches |
| 206 | in the summary and refs views. Default value: "0". See also: |
| 207 | "repo.enable-remote-branches". |
| 208 | |
Lars Hjemli | 581a0c2 | 2010-02-27 13:12:55 +0100 | [diff] [blame] | 209 | enable-subject-links:: |
| 210 | Flag which, when set to "1", will make cgit use the subject of the |
| 211 | parent commit as link text when generating links to parent commits |
| 212 | in commit view. Default value: "0". See also: |
| 213 | "repo.enable-subject-links". |
| 214 | |
Lars Hjemli | b0f946b | 2009-08-21 14:26:52 +0200 | [diff] [blame] | 215 | enable-tree-linenumbers:: |
| 216 | Flag which, when set to "1", will make cgit generate linenumber links |
| 217 | for plaintext blobs printed in the tree view. Default value: "1". |
| 218 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 219 | favicon:: |
Christian Hesse | 830eb6f | 2013-07-22 08:56:50 +0200 | [diff] [blame] | 220 | Url used as link to a shortcut icon for cgit. It is suggested to use |
| 221 | the value "/favicon.ico" since certain browsers will ignore other |
| 222 | values. Default value: "/favicon.ico". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 223 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 224 | footer:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 225 | The content of the file specified with this option will be included |
| 226 | verbatim at the bottom of all pages (i.e. it replaces the standard |
| 227 | "generated by..." message. Default value: none. |
| 228 | |
Lars Hjemli | f618e8f | 2009-07-25 12:03:54 +0200 | [diff] [blame] | 229 | head-include:: |
| 230 | The content of the file specified with this option will be included |
| 231 | verbatim in the html HEAD section on all pages. Default value: none. |
| 232 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 233 | header:: |
Lars Hjemli | b115955 | 2009-01-29 21:27:39 +0100 | [diff] [blame] | 234 | The content of the file specified with this option will be included |
| 235 | verbatim at the top of all pages. Default value: none. |
| 236 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 237 | include:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 238 | Name of a configfile to include before the rest of the current config- |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 239 | file is parsed. Default value: none. See also: "MACRO EXPANSION". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 240 | |
Andy Green | c51a641 | 2018-06-18 14:24:36 +0800 | [diff] [blame] | 241 | inline-readme:: |
| 242 | Append given filename to the list of filenames to be rendered after the |
| 243 | tree navigation in tree view, if present in the directory being viewed. Eg, |
| 244 | 'inline-readme=README.md'. You may also want a corresponding render. |
| 245 | entry for the readme suffix, eg, |
| 246 | 'render.md=/usr/libexec/cgit/filters/html-converters/md2html'. Repos will |
| 247 | use the list defined with 'inline-readme' by default, however they can |
| 248 | individually also choose to ignore this global list, and create a |
| 249 | repo-specific list by using 'repo.inline-readme'. |
| 250 | |
Andy Green | 7d3b96e | 2018-06-23 18:25:53 +0800 | [diff] [blame] | 251 | js:: |
| 252 | Url which specifies the javascript script document to include in all cgit |
| 253 | pages. Default value: "/cgit.js". Setting this to an empty string will |
| 254 | disable generation of the link to this file in the head section. |
| 255 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 256 | local-time:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 257 | Flag which, if set to "1", makes cgit print commit and tag times in the |
| 258 | servers timezone. Default value: "0". |
| 259 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 260 | logo:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 261 | Url which specifies the source of an image which will be used as a logo |
Lars Hjemli | 92f9b53 | 2009-08-10 18:14:12 +0200 | [diff] [blame] | 262 | on all cgit pages. Default value: "/cgit.png". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 263 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 264 | logo-link:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 265 | Url loaded when clicking on the cgit logo image. If unspecified the |
| 266 | calculated url of the repository index page will be used. Default |
| 267 | value: none. |
| 268 | |
Aaron Griffin | 80476b0 | 2010-02-04 18:08:16 -0600 | [diff] [blame] | 269 | max-atom-items:: |
| 270 | Specifies the number of items to display in atom feeds view. Default |
| 271 | value: "10". |
| 272 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 273 | max-blob-size:: |
| 274 | Specifies the maximum size of a blob to display HTML for in KBytes. |
| 275 | Default value: "0" (limit disabled). |
| 276 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 277 | max-commit-count:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 278 | Specifies the number of entries to list per page in "log" view. Default |
| 279 | value: "50". |
| 280 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 281 | max-message-length:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 282 | Specifies the maximum number of commit message characters to display in |
| 283 | "log" view. Default value: "80". |
| 284 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 285 | max-repo-count:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 286 | Specifies the number of entries to list per page on the repository |
| 287 | index page. Default value: "50". |
| 288 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 289 | max-repodesc-length:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 290 | Specifies the maximum number of repo description characters to display |
| 291 | on the repository index page. Default value: "80". |
| 292 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 293 | max-stats:: |
Lars Hjemli | fb2f3f6 | 2008-12-07 13:17:21 +0100 | [diff] [blame] | 294 | Set the default maximum statistics period. Valid values are "week", |
| 295 | "month", "quarter" and "year". If unspecified, statistics are |
| 296 | disabled. Default value: none. See also: "repo.max-stats". |
| 297 | |
Lars Hjemli | c4d46c7 | 2009-02-13 20:43:30 +0100 | [diff] [blame] | 298 | mimetype.<ext>:: |
| 299 | Set the mimetype for the specified filename extension. This is used |
| 300 | by the `plain` command when returning blob content. |
| 301 | |
Ferry Huberts | d01c600 | 2011-07-19 10:51:58 +0200 | [diff] [blame] | 302 | mimetype-file:: |
| 303 | Specifies the file to use for automatic mimetype lookup. If specified |
| 304 | then this field is used as a fallback when no "mimetype.<ext>" match is |
| 305 | found. If unspecified then no such lookup is performed. The typical file |
Jason A. Donenfeld | c6f5bc7 | 2012-11-15 17:21:47 +0100 | [diff] [blame] | 306 | to use on a Linux system is /etc/mime.types. The format of the file must |
| 307 | comply to: |
Ferry Huberts | d01c600 | 2011-07-19 10:51:58 +0200 | [diff] [blame] | 308 | - a comment line is an empty line or a line starting with a hash (#), |
| 309 | optionally preceded by whitespace |
| 310 | - a non-comment line starts with the mimetype (like image/png), followed |
| 311 | by one or more file extensions (like jpg), all separated by whitespace |
Jason A. Donenfeld | ab9805a | 2012-11-15 01:26:06 +0100 | [diff] [blame] | 312 | Default value: none. See also: "mimetype.<ext>". |
Ferry Huberts | d01c600 | 2011-07-19 10:51:58 +0200 | [diff] [blame] | 313 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 314 | module-link:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 315 | Text which will be used as the formatstring for a hyperlink when a |
| 316 | submodule is printed in a directory listing. The arguments for the |
| 317 | formatstring are the path and SHA1 of the submodule commit. Default |
Lars Hjemli | 3fbaf09 | 2011-06-15 10:13:15 +0200 | [diff] [blame] | 318 | value: none. |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 319 | |
Martin Szulecki | 2f56e39 | 2009-08-07 14:05:17 +0200 | [diff] [blame] | 320 | noplainemail:: |
Jason A. Donenfeld | cf15260 | 2013-08-16 13:15:17 -0600 | [diff] [blame] | 321 | If set to "1" showing full author email addresses will be disabled. |
Martin Szulecki | 2f56e39 | 2009-08-07 14:05:17 +0200 | [diff] [blame] | 322 | Default value: "0". |
| 323 | |
Lars Hjemli | 286a905 | 2009-07-25 12:29:22 +0200 | [diff] [blame] | 324 | noheader:: |
Lars Hjemli | 86b753c | 2009-07-25 12:23:30 +0200 | [diff] [blame] | 325 | Flag which, when set to "1", will make cgit omit the standard header |
| 326 | on all pages. Default value: none. See also: "embedded". |
| 327 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 328 | owner-filter:: |
| 329 | Specifies a command which will be invoked to format the Owner |
| 330 | column of the main page. The command will get the owner on STDIN, |
| 331 | and the STDOUT from the command will be included verbatim in the |
| 332 | table. This can be used to link to additional context such as an |
| 333 | owners home page. When active this filter is used instead of the |
| 334 | default owner query url. Default value: none. |
| 335 | See also: "FILTER API". |
| 336 | |
Jason A. Donenfeld | 3516502 | 2010-07-29 17:52:29 +0200 | [diff] [blame] | 337 | project-list:: |
| 338 | A list of subdirectories inside of scan-path, relative to it, that |
| 339 | should loaded as git repositories. This must be defined prior to |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 340 | scan-path. Default value: none. See also: scan-path, "MACRO |
| 341 | EXPANSION". |
Jason A. Donenfeld | 3516502 | 2010-07-29 17:52:29 +0200 | [diff] [blame] | 342 | |
Lars Hjemli | 515edb0 | 2010-08-21 15:08:01 +0200 | [diff] [blame] | 343 | readme:: |
Jason A. Donenfeld | 2a1ead3 | 2013-05-25 20:30:57 +0200 | [diff] [blame] | 344 | Text which will be used as default value for "repo.readme". Multiple |
Jason A. Donenfeld | dcbc043 | 2013-05-26 15:20:02 +0200 | [diff] [blame] | 345 | config keys may be specified, and cgit will use the first found file |
| 346 | in this list. This is useful in conjunction with scan-path. Default |
| 347 | value: none. See also: scan-path, repo.readme. |
Lars Hjemli | 515edb0 | 2010-08-21 15:08:01 +0200 | [diff] [blame] | 348 | |
Jason A. Donenfeld | 2e4a941 | 2010-07-29 19:47:50 +0200 | [diff] [blame] | 349 | remove-suffix:: |
| 350 | If set to "1" and scan-path is enabled, if any repositories are found |
| 351 | with a suffix of ".git", this suffix will be removed for the url and |
Jason A. Donenfeld | a8d613e | 2013-04-10 14:42:49 +0200 | [diff] [blame] | 352 | name. This must be defined prior to scan-path. Default value: "0". |
| 353 | See also: scan-path. |
Jason A. Donenfeld | 2e4a941 | 2010-07-29 19:47:50 +0200 | [diff] [blame] | 354 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 355 | renamelimit:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 356 | Maximum number of files to consider when detecting renames. The value |
| 357 | "-1" uses the compiletime value in git (for further info, look at |
| 358 | `man git-diff`). Default value: "-1". |
| 359 | |
John Keeping | 653da15 | 2018-06-18 14:22:12 +0800 | [diff] [blame] | 360 | render.<ext>:: |
| 361 | Specifies a command which will be invoked to render files with the |
| 362 | extension `.<ext>`. The command will get the blob content on its STDIN |
| 363 | and the name of the blob as its only command line argument. The STDOUT |
| 364 | from the command will be included verbatim in the page content. If no |
| 365 | render filter is available for a given file extension but the mimetype |
| 366 | is specified then the content will be included as an iframe, otherwise |
| 367 | the normal source rendering will be used. Note <ext> may be empty, in |
| 368 | which case the render filter is used on files with no suffix. |
| 369 | + |
| 370 | Default value: none. See also: "FILTER API". |
| 371 | |
Jason A. Donenfeld | 389cc17 | 2013-04-08 16:57:12 +0200 | [diff] [blame] | 372 | repository-sort:: |
| 373 | The way in which repositories in each section are sorted. Valid values |
| 374 | are "name" for sorting by the repo name or "age" for sorting by the |
| 375 | most recently updated repository. Default value: "name". See also: |
| 376 | section, case-sensitive-sort, section-sort. |
| 377 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 378 | robots:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 379 | Text used as content for the "robots" meta-tag. Default value: |
| 380 | "index, nofollow". |
| 381 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 382 | root-desc:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 383 | Text printed below the heading on the repository index page. Default |
| 384 | value: "a fast webinterface for the git dscm". |
| 385 | |
Andy Green | 5eec453 | 2018-06-24 08:13:05 +0800 | [diff] [blame] | 386 | root-desc-html:: |
| 387 | Optional additional raw html to show in the header after root-desc. |
| 388 | Default value: none. |
| 389 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 390 | root-readme:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 391 | The content of the file specified with this option will be included |
| 392 | verbatim below the "about" link on the repository index page. Default |
| 393 | value: none. |
| 394 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 395 | root-title:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 396 | Text printed as heading on the repository index page. Default value: |
| 397 | "Git Repository Browser". |
| 398 | |
Johan Herland | df52279 | 2010-11-15 20:41:00 +0100 | [diff] [blame] | 399 | scan-hidden-path:: |
| 400 | If set to "1" and scan-path is enabled, scan-path will recurse into |
| 401 | directories whose name starts with a period ('.'). Otherwise, |
| 402 | scan-path will stay away from such directories (considered as |
| 403 | "hidden"). Note that this does not apply to the ".git" directory in |
| 404 | non-bare repos. This must be defined prior to scan-path. |
| 405 | Default value: 0. See also: scan-path. |
| 406 | |
Lars Hjemli | 0046637 | 2009-08-23 19:35:56 +0200 | [diff] [blame] | 407 | scan-path:: |
| 408 | A path which will be scanned for repositories. If caching is enabled, |
| 409 | the result will be cached as a cgitrc include-file in the cache |
Jason A. Donenfeld | 3516502 | 2010-07-29 17:52:29 +0200 | [diff] [blame] | 410 | directory. If project-list has been defined prior to scan-path, |
| 411 | scan-path loads only the directories listed in the file pointed to by |
Julius Plenz | facca56 | 2011-03-10 17:03:24 +0100 | [diff] [blame] | 412 | project-list. Be advised that only the global settings taken |
| 413 | before the scan-path directive will be applied to each repository. |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 414 | Default value: none. See also: cache-scanrc-ttl, project-list, |
| 415 | "MACRO EXPANSION". |
Lars Hjemli | 0046637 | 2009-08-23 19:35:56 +0200 | [diff] [blame] | 416 | |
Lars Hjemli | 007df98 | 2009-08-24 07:51:48 +0200 | [diff] [blame] | 417 | section:: |
Lars Hjemli | e7af002 | 2009-08-23 22:58:39 +0200 | [diff] [blame] | 418 | The name of the current repository section - all repositories defined |
| 419 | after this option will inherit the current section name. Default value: |
| 420 | none. |
| 421 | |
Tobias Bieniek | 7a4e7c8 | 2012-10-09 20:53:29 +0200 | [diff] [blame] | 422 | section-sort:: |
| 423 | Flag which, when set to "1", will sort the sections on the repository |
| 424 | listing by name. Set this flag to "0" if the order in the cgitrc file should |
| 425 | be preserved. Default value: "1". See also: section, |
| 426 | case-sensitive-sort, repository-sort. |
Jason A. Donenfeld | 184c565 | 2012-07-12 19:13:39 +0200 | [diff] [blame] | 427 | |
Lars Hjemli | 797110e | 2010-08-21 15:44:09 +0200 | [diff] [blame] | 428 | section-from-path:: |
Jason A. Donenfeld | a8d613e | 2013-04-10 14:42:49 +0200 | [diff] [blame] | 429 | A number which, if defined prior to scan-path, specifies how many |
Lars Hjemli | 797110e | 2010-08-21 15:44:09 +0200 | [diff] [blame] | 430 | path elements from each repo path to use as a default section name. |
| 431 | If negative, cgit will discard the specified number of path elements |
Jason A. Donenfeld | 184c565 | 2012-07-12 19:13:39 +0200 | [diff] [blame] | 432 | above the repo directory. Default value: "0". |
Lars Hjemli | 797110e | 2010-08-21 15:44:09 +0200 | [diff] [blame] | 433 | |
Ragnar Ouchterlony | c358aa3 | 2009-09-14 20:19:02 +0200 | [diff] [blame] | 434 | side-by-side-diffs:: |
| 435 | If set to "1" shows side-by-side diffs instead of unidiffs per |
| 436 | default. Default value: "0". |
| 437 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 438 | snapshots:: |
Lukas Fleischer | 70546a3 | 2014-01-14 00:49:48 +0100 | [diff] [blame] | 439 | Text which specifies the default set of snapshot formats that cgit |
| 440 | generates links for. The value is a space-separated list of zero or |
| 441 | more of the values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip". |
Christian Hesse | 30a378b | 2018-06-07 22:01:50 +0200 | [diff] [blame] | 442 | The special value "all" enables all snapshot formats. |
Lukas Fleischer | 70546a3 | 2014-01-14 00:49:48 +0100 | [diff] [blame] | 443 | Default value: none. |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 444 | |
Lars Hjemli | 46b7abe | 2009-07-31 16:55:27 +0200 | [diff] [blame] | 445 | source-filter:: |
| 446 | Specifies a command which will be invoked to format plaintext blobs |
| 447 | in the tree view. The command will get the blob content on its STDIN |
| 448 | and the name of the blob as its only command line argument. The STDOUT |
| 449 | from the command will be included verbatim as the blob contents, i.e. |
| 450 | this can be used to implement e.g. syntax highlighting. Default value: |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 451 | none. See also: "FILTER API". |
Lars Hjemli | 46b7abe | 2009-07-31 16:55:27 +0200 | [diff] [blame] | 452 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 453 | summary-branches:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 454 | Specifies the number of branches to display in the repository "summary" |
| 455 | view. Default value: "10". |
| 456 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 457 | summary-log:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 458 | Specifies the number of log entries to display in the repository |
| 459 | "summary" view. Default value: "10". |
| 460 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 461 | summary-tags:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 462 | Specifies the number of tags to display in the repository "summary" |
| 463 | view. Default value: "10". |
| 464 | |
Felix Hanley | e0c6f23 | 2010-11-08 19:41:13 +0100 | [diff] [blame] | 465 | strict-export:: |
| 466 | Filename which, if specified, needs to be present within the repository |
| 467 | for cgit to allow access to that repository. This can be used to emulate |
| 468 | gitweb's EXPORT_OK and STRICT_EXPORT functionality and limit cgit's |
Jason A. Donenfeld | a8d613e | 2013-04-10 14:42:49 +0200 | [diff] [blame] | 469 | repositories to match those exported by git-daemon. This option must |
| 470 | be defined prior to scan-path. |
Felix Hanley | e0c6f23 | 2010-11-08 19:41:13 +0100 | [diff] [blame] | 471 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 472 | virtual-root:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 473 | Url which, if specified, will be used as root for all cgit links. It |
| 474 | will also cause cgit to generate 'virtual urls', i.e. urls like |
| 475 | '/cgit/tree/README' as opposed to '?r=cgit&p=tree&path=README'. Default |
| 476 | value: none. |
| 477 | NOTE: cgit has recently learned how to use PATH_INFO to achieve the |
| 478 | same kind of virtual urls, so this option will probably be deprecated. |
| 479 | |
Jason A. Donenfeld | 521e10c | 2012-10-09 06:56:14 -0400 | [diff] [blame] | 480 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 481 | REPOSITORY SETTINGS |
| 482 | ------------------- |
Lars Hjemli | 537c05f | 2009-08-09 13:27:21 +0200 | [diff] [blame] | 483 | repo.about-filter:: |
Lars Hjemli | 2273c2c | 2009-08-24 08:53:21 +0200 | [diff] [blame] | 484 | Override the default about-filter. Default value: none. See also: |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 485 | "enable-filter-overrides". See also: "FILTER API". |
Lars Hjemli | 537c05f | 2009-08-09 13:27:21 +0200 | [diff] [blame] | 486 | |
Jason A. Donenfeld | 389cc17 | 2013-04-08 16:57:12 +0200 | [diff] [blame] | 487 | repo.branch-sort:: |
| 488 | Flag which, when set to "age", enables date ordering in the branch ref |
| 489 | list, and when set to "name" enables ordering by branch name. Default |
| 490 | value: "name". |
| 491 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 492 | repo.clone-url:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 493 | A list of space-separated urls which can be used to clone this repo. |
Lars Hjemli | a1429db | 2011-06-06 20:49:13 +0000 | [diff] [blame] | 494 | Default value: none. See also: "MACRO EXPANSION". |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 495 | |
Lars Hjemli | e976df2 | 2009-08-09 13:22:00 +0200 | [diff] [blame] | 496 | repo.commit-filter:: |
Lars Hjemli | 2273c2c | 2009-08-24 08:53:21 +0200 | [diff] [blame] | 497 | Override the default commit-filter. Default value: none. See also: |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 498 | "enable-filter-overrides". See also: "FILTER API". |
Lars Hjemli | e976df2 | 2009-08-09 13:22:00 +0200 | [diff] [blame] | 499 | |
Jason A. Donenfeld | 389cc17 | 2013-04-08 16:57:12 +0200 | [diff] [blame] | 500 | repo.commit-sort:: |
| 501 | Flag which, when set to "date", enables strict date ordering in the |
| 502 | commit log, and when set to "topo" enables strict topological |
| 503 | ordering. If unset, the default ordering of "git log" is used. Default |
| 504 | value: unset. |
| 505 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 506 | repo.defbranch:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 507 | The name of the default branch for this repository. If no such branch |
| 508 | exists in the repository, the first branch name (when sorted) is used |
Julius Plenz | d711de5 | 2011-04-07 12:59:24 +0200 | [diff] [blame] | 509 | as default instead. Default value: branch pointed to by HEAD, or |
| 510 | "master" if there is no suitable HEAD. |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 511 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 512 | repo.desc:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 513 | The value to show as repository description. Default value: none. |
| 514 | |
Andy Green | 5eec453 | 2018-06-24 08:13:05 +0800 | [diff] [blame] | 515 | repo.desc-html:: |
| 516 | Optional additional raw html to show in the header after repo.desc. |
| 517 | Default value: none. It's possible to leave repo.desc undefined, |
| 518 | and just define repo.desc-html. But it would mean the repo name |
| 519 | in the cgit repo list page will show the html parts. Depending on |
| 520 | the html, it may be preferable to define repo.desc so the repo list |
| 521 | can just use that and leave out the html. |
| 522 | |
Jason A. Donenfeld | a5e1553 | 2014-01-13 04:04:52 +0100 | [diff] [blame] | 523 | repo.email-filter:: |
| 524 | Override the default email-filter. Default value: none. See also: |
| 525 | "enable-filter-overrides". See also: "FILTER API". |
| 526 | |
Johan Herland | 9a8d39c | 2010-11-15 18:39:50 +0100 | [diff] [blame] | 527 | repo.enable-commit-graph:: |
| 528 | A flag which can be used to disable the global setting |
| 529 | `enable-commit-graph'. Default value: none. |
| 530 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 531 | repo.enable-html-serving:: |
| 532 | A flag which can be used to override the global setting |
| 533 | `enable-html-serving`. Default value: none. |
| 534 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 535 | repo.enable-log-filecount:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 536 | A flag which can be used to disable the global setting |
| 537 | `enable-log-filecount'. Default value: none. |
| 538 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 539 | repo.enable-log-linecount:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 540 | A flag which can be used to disable the global setting |
| 541 | `enable-log-linecount'. Default value: none. |
| 542 | |
Lars Hjemli | 41934a3 | 2009-11-07 19:10:58 +0100 | [diff] [blame] | 543 | repo.enable-remote-branches:: |
| 544 | Flag which, when set to "1", will make cgit display remote branches |
| 545 | in the summary and refs views. Default value: <enable-remote-branches>. |
| 546 | |
Lars Hjemli | 581a0c2 | 2010-02-27 13:12:55 +0100 | [diff] [blame] | 547 | repo.enable-subject-links:: |
| 548 | A flag which can be used to override the global setting |
| 549 | `enable-subject-links'. Default value: none. |
| 550 | |
Lukas Fleischer | c58cec9 | 2015-01-29 12:52:49 +0100 | [diff] [blame] | 551 | repo.hide:: |
| 552 | Flag which, when set to "1", hides the repository from the repository |
| 553 | index. The repository can still be accessed by providing a direct path. |
| 554 | Default value: "0". See also: "repo.ignore". |
| 555 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 556 | repo.homepage:: |
| 557 | The value to show as repository homepage. Default value: none. |
| 558 | |
Lukas Fleischer | c58cec9 | 2015-01-29 12:52:49 +0100 | [diff] [blame] | 559 | repo.ignore:: |
| 560 | Flag which, when set to "1", ignores the repository. The repository |
| 561 | is not shown in the index and cannot be accessed by providing a direct |
| 562 | path. Default value: "0". See also: "repo.hide". |
| 563 | |
Andy Green | 7d7ec48 | 2018-06-18 14:24:57 +0800 | [diff] [blame] | 564 | repo.inline-readme:: |
| 565 | Append given filename to the list of filenames to be rendered after the |
| 566 | tree navigation in tree view, if present in the directory being viewed. Eg, |
| 567 | 'repo.inline-readme=README.md'. You may also want a corresponding render. |
| 568 | entry for the readme suffix, eg, |
| 569 | 'render.md=/usr/libexec/cgit/filters/html-converters/md2html'. |
| 570 | If not given, the repo will use any global 'inline-readme=' configuration; |
| 571 | if any 'repo.inline-readme' are given only they are used for that repo, |
| 572 | and the global 'inline-readme=' list is ignored for that repo. |
| 573 | |
Bernhard Reutner-Fischer | 808c685 | 2010-12-23 12:47:54 +0100 | [diff] [blame] | 574 | repo.logo:: |
| 575 | Url which specifies the source of an image which will be used as a logo |
| 576 | on this repo's pages. Default value: global logo. |
| 577 | |
| 578 | repo.logo-link:: |
| 579 | Url loaded when clicking on the cgit logo image. If unspecified the |
| 580 | calculated url of the repository index page will be used. Default |
| 581 | value: global logo-link. |
| 582 | |
Lars Hjemli | 46ca32e | 2011-06-15 09:58:42 +0200 | [diff] [blame] | 583 | repo.module-link:: |
| 584 | Text which will be used as the formatstring for a hyperlink when a |
| 585 | submodule is printed in a directory listing. The arguments for the |
| 586 | formatstring are the path and SHA1 of the submodule commit. Default |
| 587 | value: <module-link> |
| 588 | |
Lars Hjemli | 6857bec | 2011-06-15 10:04:13 +0200 | [diff] [blame] | 589 | repo.module-link.<path>:: |
| 590 | Text which will be used as the formatstring for a hyperlink when a |
| 591 | submodule with the specified subdirectory path is printed in a |
| 592 | directory listing. The only argument for the formatstring is the SHA1 |
| 593 | of the submodule commit. Default value: none. |
| 594 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 595 | repo.max-stats:: |
Lars Hjemli | fb2f3f6 | 2008-12-07 13:17:21 +0100 | [diff] [blame] | 596 | Override the default maximum statistics period. Valid values are equal |
| 597 | to the values specified for the global "max-stats" setting. Default |
| 598 | value: none. |
Lars Hjemli | f86a23f | 2008-12-06 17:38:19 +0100 | [diff] [blame] | 599 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 600 | repo.name:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 601 | The value to show as repository name. Default value: <repo.url>. |
| 602 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 603 | repo.owner:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 604 | A value used to identify the owner of the repository. Default value: |
| 605 | none. |
| 606 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 607 | repo.owner-filter:: |
| 608 | Override the default owner-filter. Default value: none. See also: |
| 609 | "enable-filter-overrides". See also: "FILTER API". |
| 610 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 611 | repo.path:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 612 | An absolute path to the repository directory. For non-bare repositories |
| 613 | this is the .git-directory. Default value: none. |
| 614 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 615 | repo.readme:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 616 | A path (relative to <repo.path>) which specifies a file to include |
Jason A. Donenfeld | 379e80e | 2010-08-04 00:45:42 +0200 | [diff] [blame] | 617 | verbatim as the "About" page for this repo. You may also specify a |
| 618 | git refspec by head or by hash by prepending the refspec followed by |
Jason A. Donenfeld | 3cb5d86 | 2013-05-25 14:19:10 +0200 | [diff] [blame] | 619 | a colon. For example, "master:docs/readme.mkd". If the value begins |
| 620 | with a colon, i.e. ":docs/readme.rst", the default branch of the |
Jason A. Donenfeld | 2a1ead3 | 2013-05-25 20:30:57 +0200 | [diff] [blame] | 621 | repository will be used. Sharing any file will expose that entire |
| 622 | directory tree to the "/about/PATH" endpoints, so be sure that there |
| 623 | are no non-public files located in the same directory as the readme |
| 624 | file. Default value: <readme>. |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 625 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 626 | repo.section:: |
| 627 | Override the current section name for this repository. Default value: |
| 628 | none. |
| 629 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 630 | repo.snapshots:: |
Lukas Fleischer | 70546a3 | 2014-01-14 00:49:48 +0100 | [diff] [blame] | 631 | A mask of snapshot formats for this repo that cgit generates links for, |
| 632 | restricted by the global "snapshots" setting. Default value: |
| 633 | <snapshots>. |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 634 | |
John Keeping | c1572bb | 2018-03-31 14:20:01 +0100 | [diff] [blame] | 635 | repo.snapshot-prefix:: |
| 636 | Prefix to use for snapshot links instead of the repository basename. |
| 637 | For example, the "linux-stable" repository may wish to set this to |
| 638 | "linux" so that snapshots are in the format "linux-3.15.4" instead |
| 639 | of "linux-stable-3.15.4". Default value: <empty> meaning to use |
| 640 | the repository basename. |
| 641 | |
Lars Hjemli | e976df2 | 2009-08-09 13:22:00 +0200 | [diff] [blame] | 642 | repo.source-filter:: |
Lars Hjemli | 2273c2c | 2009-08-24 08:53:21 +0200 | [diff] [blame] | 643 | Override the default source-filter. Default value: none. See also: |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 644 | "enable-filter-overrides". See also: "FILTER API". |
Lars Hjemli | e976df2 | 2009-08-09 13:22:00 +0200 | [diff] [blame] | 645 | |
Lars Hjemli | d3b2933 | 2009-02-12 09:58:28 +0100 | [diff] [blame] | 646 | repo.url:: |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 647 | The relative url used to access the repository. This must be the first |
| 648 | setting specified for each repo. Default value: none. |
| 649 | |
| 650 | |
Lars Hjemli | 74061ed | 2009-08-24 00:04:58 +0200 | [diff] [blame] | 651 | REPOSITORY-SPECIFIC CGITRC FILE |
| 652 | ------------------------------- |
Lars Hjemli | 007df98 | 2009-08-24 07:51:48 +0200 | [diff] [blame] | 653 | When the option "scan-path" is used to auto-discover git repositories, cgit |
| 654 | will try to parse the file "cgitrc" within any found repository. Such a |
| 655 | repo-specific config file may contain any of the repo-specific options |
Lars Hjemli | 2273c2c | 2009-08-24 08:53:21 +0200 | [diff] [blame] | 656 | described above, except "repo.url" and "repo.path". Additionally, the "filter" |
| 657 | options are only acknowledged in repo-specific config files when |
| 658 | "enable-filter-overrides" is set to "1". |
| 659 | |
| 660 | Note: the "repo." prefix is dropped from the option names in repo-specific |
| 661 | config files, e.g. "repo.desc" becomes "desc". |
Lars Hjemli | 74061ed | 2009-08-24 00:04:58 +0200 | [diff] [blame] | 662 | |
| 663 | |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 664 | FILTER API |
| 665 | ---------- |
John Keeping | 4bb87cb | 2014-01-12 17:13:53 +0000 | [diff] [blame] | 666 | By default, filters are separate processes that are executed each time they |
| 667 | are needed. Alternative technologies may be used by prefixing the filter |
| 668 | specification with the relevant string; available values are: |
| 669 | |
| 670 | 'exec:':: |
| 671 | The default "one process per filter" mode. |
| 672 | |
Jason A. Donenfeld | f43b228 | 2014-01-13 14:18:51 +0100 | [diff] [blame] | 673 | 'lua:':: |
| 674 | Executes the script using a built-in Lua interpreter. The script is |
| 675 | loaded once per execution of cgit, and may be called multiple times |
| 676 | during cgit's lifetime, making it a good choice for repeated filters |
| 677 | such as the 'email filter'. It responds to three functions: |
| 678 | |
| 679 | 'filter_open(argument1, argument2, argument3, ...)':: |
| 680 | This is called upon activation of the filter for a particular |
| 681 | set of data. |
| 682 | 'filter_write(buffer)':: |
| 683 | This is called whenever cgit writes data to the webpage. |
| 684 | 'filter_close()':: |
| 685 | This is called when the current filtering operation is |
Jason A. Donenfeld | 6ca734d | 2014-01-14 18:07:23 +0100 | [diff] [blame] | 686 | completed. It must return an integer value. Usually 0 |
| 687 | indicates success. |
Christian Hesse | b431282 | 2014-04-17 11:55:46 +0200 | [diff] [blame] | 688 | |
Jason A. Donenfeld | f43b228 | 2014-01-13 14:18:51 +0100 | [diff] [blame] | 689 | Additionally, cgit exposes to the Lua the following built-in functions: |
| 690 | |
| 691 | 'html(str)':: |
| 692 | Writes 'str' to the webpage. |
| 693 | 'html_txt(str)':: |
| 694 | HTML escapes and writes 'str' to the webpage. |
| 695 | 'html_attr(str)':: |
| 696 | HTML escapes for an attribute and writes "str' to the webpage. |
| 697 | 'html_url_path(str)':: |
| 698 | URL escapes for a path and writes 'str' to the webpage. |
| 699 | 'html_url_arg(str)':: |
| 700 | URL escapes for an argument and writes 'str' to the webpage. |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 701 | 'html_include(file)':: |
| 702 | Includes 'file' in webpage. |
Jason A. Donenfeld | f43b228 | 2014-01-13 14:18:51 +0100 | [diff] [blame] | 703 | |
| 704 | |
John Keeping | 4bb87cb | 2014-01-12 17:13:53 +0000 | [diff] [blame] | 705 | Parameters are provided to filters as follows. |
| 706 | |
Lars Hjemli | b88cda6 | 2011-06-13 22:34:13 +0000 | [diff] [blame] | 707 | about filter:: |
Jason A. Donenfeld | c0dfaf1 | 2013-05-25 14:50:19 +0200 | [diff] [blame] | 708 | This filter is given a single parameter: the filename of the source |
| 709 | file to filter. The filter can use the filename to determine (for |
| 710 | example) the type of syntax to follow when formatting the readme file. |
| 711 | The about text that is to be filtered is available on standard input |
| 712 | and the filtered text is expected on standard output. |
Lars Hjemli | b88cda6 | 2011-06-13 22:34:13 +0000 | [diff] [blame] | 713 | |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 714 | auth filter:: |
Jason A. Donenfeld | a431326 | 2014-01-16 23:21:54 +0100 | [diff] [blame] | 715 | The authentication filter receives 12 parameters: |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 716 | - filter action, explained below, which specifies which action the |
| 717 | filter is called for |
| 718 | - http cookie |
| 719 | - http method |
| 720 | - http referer |
| 721 | - http path |
| 722 | - http https flag |
| 723 | - cgit repo |
| 724 | - cgit page |
| 725 | - cgit url |
Jason A. Donenfeld | a431326 | 2014-01-16 23:21:54 +0100 | [diff] [blame] | 726 | - cgit login url |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 727 | When the filter action is "body", this filter must write to output the |
Jason A. Donenfeld | a431326 | 2014-01-16 23:21:54 +0100 | [diff] [blame] | 728 | HTML for displaying the login form, which POSTs to the login url. When |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 729 | the filter action is "authenticate-cookie", this filter must validate |
| 730 | the http cookie and return a 0 if it is invalid or 1 if it is invalid, |
| 731 | in the exit code / close function. If the filter action is |
| 732 | "authenticate-post", this filter receives POST'd parameters on |
Jason A. Donenfeld | efa2879 | 2014-08-01 17:37:27 +0200 | [diff] [blame] | 733 | standard input, and should write a complete CGI response, preferably |
Jason A. Donenfeld | b826537 | 2014-01-16 11:39:17 +0100 | [diff] [blame] | 734 | with a 302 redirect, and write to output one or more "Set-Cookie" |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 735 | HTTP headers, each followed by a newline. |
| 736 | |
| 737 | Please see `filters/simple-authentication.lua` for a clear example |
| 738 | script that may be modified. |
| 739 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 740 | commit filter:: |
| 741 | This filter is given no arguments. The commit message text that is to |
| 742 | be filtered is available on standard input and the filtered text is |
| 743 | expected on standard output. |
| 744 | |
| 745 | email filter:: |
| 746 | This filter is given two parameters: the email address of the relevant |
| 747 | author and a string indicating the originating page. The filter will |
| 748 | then receive the text string to format on standard input and is |
| 749 | expected to write to standard output the formatted text to be included |
| 750 | in the page. |
| 751 | |
| 752 | owner filter:: |
| 753 | This filter is given no arguments. The owner text is available on |
| 754 | standard input and the filter is expected to write to standard |
| 755 | output. The output is included in the Owner column. |
| 756 | |
John Keeping | 653da15 | 2018-06-18 14:22:12 +0800 | [diff] [blame] | 757 | render filter:: |
Andy Green | 1ef4d39 | 2018-06-18 14:25:59 +0800 | [diff] [blame] | 758 | This filter is given a single required parameter: the filename of |
| 759 | the source file to render. The filter can use the filename to |
| 760 | determine (for example) the syntax highlighting mode. The |
| 761 | contents of the file that is to be rendered is available on standard |
| 762 | input and the rendered content is expected on standard output. Two |
| 763 | additional optional parameters are the base URL path and optional |
| 764 | URL parameter arguments needed to adapt relative paths in the input |
| 765 | to absolute URLs pointing to the "plain" version of the file in the |
| 766 | repo rev context, eg, "/myvirt/reponame/plain" and "?h=mybranch" |
| 767 | could be used to convert input references like "pics/myfile.png" to |
| 768 | '<img src="/myvirt/reponame/plain/pics/myfile.png?h=mybranch">' |
John Keeping | 653da15 | 2018-06-18 14:22:12 +0800 | [diff] [blame] | 769 | |
Andy Green | 9086260 | 2018-06-20 18:12:03 +0800 | [diff] [blame] | 770 | source filter:: |
| 771 | This filter is given a single parameter: the filename of the source |
| 772 | file to filter. The filter can use the filename to determine (for |
| 773 | example) the syntax highlighting mode. The contents of the source |
| 774 | file that is to be filtered is available on standard input and the |
| 775 | filtered contents is expected on standard output. |
| 776 | |
Jason A. Donenfeld | d6e9200 | 2014-01-14 21:49:31 +0100 | [diff] [blame] | 777 | |
| 778 | All filters are handed the following environment variables: |
Lars Hjemli | b88cda6 | 2011-06-13 22:34:13 +0000 | [diff] [blame] | 779 | |
| 780 | - CGIT_REPO_URL (from repo.url) |
| 781 | - CGIT_REPO_NAME (from repo.name) |
| 782 | - CGIT_REPO_PATH (from repo.path) |
| 783 | - CGIT_REPO_OWNER (from repo.owner) |
| 784 | - CGIT_REPO_DEFBRANCH (from repo.defbranch) |
| 785 | - CGIT_REPO_SECTION (from repo.section) |
| 786 | - CGIT_REPO_CLONE_URL (from repo.clone-url) |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 787 | |
| 788 | If a setting is not defined for a repository and the corresponding global |
| 789 | setting is also not defined (if applicable), then the corresponding |
Lukas Fleischer | d96d2c9 | 2011-09-14 11:52:43 +0200 | [diff] [blame] | 790 | environment variable will be unset. |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 791 | |
Ferry Huberts | b2cf630 | 2011-03-23 11:57:44 +0100 | [diff] [blame] | 792 | |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 793 | MACRO EXPANSION |
| 794 | --------------- |
Přemysl Janouch | 88028ad | 2013-09-11 20:10:10 +0200 | [diff] [blame] | 795 | The following cgitrc options support a simple macro expansion feature, |
| 796 | where tokens prefixed with "$" are replaced with the value of a similarly |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 797 | named environment variable: |
| 798 | |
| 799 | - cache-root |
| 800 | - include |
| 801 | - project-list |
| 802 | - scan-path |
| 803 | |
| 804 | Macro expansion will also happen on the content of $CGIT_CONFIG, if |
| 805 | defined. |
| 806 | |
| 807 | One usage of this feature is virtual hosting, which in its simplest form |
| 808 | can be accomplished by adding the following line to /etc/cgitrc: |
| 809 | |
| 810 | include=/etc/cgitrc.d/$HTTP_HOST |
| 811 | |
Lars Hjemli | a1429db | 2011-06-06 20:49:13 +0000 | [diff] [blame] | 812 | The following options are expanded during request processing, and support |
| 813 | the environment variables defined in "FILTER API": |
| 814 | |
| 815 | - clone-url |
| 816 | - repo.clone-url |
| 817 | |
Lars Hjemli | ef13e5e | 2011-06-13 21:58:39 +0000 | [diff] [blame] | 818 | |
Jason A. Donenfeld | 2e8e9af | 2014-02-21 01:36:20 +0100 | [diff] [blame] | 819 | CACHE |
| 820 | ------ |
| 821 | |
| 822 | All cache ttl values are in minutes. Negative ttl values indicate that a page |
| 823 | type will never expire, and thus the first time a URL is accessed, the result |
| 824 | will be cached indefinitely, even if the underlying git repository changes. |
| 825 | Conversely, when a ttl value is zero, the cache is disabled for that |
| 826 | particular page type, and the page type is never cached. |
| 827 | |
| 828 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 829 | EXAMPLE CGITRC FILE |
| 830 | ------------------- |
| 831 | |
Lars Hjemli | b875a9e | 2009-02-12 10:02:09 +0100 | [diff] [blame] | 832 | .... |
Přemysl Janouch | 88028ad | 2013-09-11 20:10:10 +0200 | [diff] [blame] | 833 | # Enable caching of up to 1000 output entries |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 834 | cache-size=1000 |
| 835 | |
| 836 | |
Lars Hjemli | a1429db | 2011-06-06 20:49:13 +0000 | [diff] [blame] | 837 | # Specify some default clone urls using macro expansion |
| 838 | clone-url=git://foo.org/$CGIT_REPO_URL git@foo.org:$CGIT_REPO_URL |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 839 | |
| 840 | # Specify the css url |
| 841 | css=/css/cgit.css |
| 842 | |
| 843 | |
Jason A. Donenfeld | d6d3dbc | 2013-05-27 21:47:02 +0200 | [diff] [blame] | 844 | # Show owner on index page |
| 845 | enable-index-owner=1 |
| 846 | |
| 847 | |
| 848 | # Allow http transport git clone |
Přemysl Janouch | 17e6a2a | 2013-09-11 20:10:13 +0200 | [diff] [blame] | 849 | enable-http-clone=1 |
Jason A. Donenfeld | d6d3dbc | 2013-05-27 21:47:02 +0200 | [diff] [blame] | 850 | |
| 851 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 852 | # Show extra links for each repository on the index page |
| 853 | enable-index-links=1 |
| 854 | |
| 855 | |
Jeff Smith | c1cd290 | 2017-10-01 23:39:08 -0500 | [diff] [blame] | 856 | # Enable blame page and create links to it from tree page |
| 857 | enable-blame=1 |
| 858 | |
| 859 | |
Johan Herland | 9a8d39c | 2010-11-15 18:39:50 +0100 | [diff] [blame] | 860 | # Enable ASCII art commit history graph on the log pages |
| 861 | enable-commit-graph=1 |
| 862 | |
| 863 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 864 | # Show number of affected files per commit on the log pages |
| 865 | enable-log-filecount=1 |
| 866 | |
| 867 | |
| 868 | # Show number of added/removed lines per commit on the log pages |
| 869 | enable-log-linecount=1 |
| 870 | |
| 871 | |
Jason A. Donenfeld | d6d3dbc | 2013-05-27 21:47:02 +0200 | [diff] [blame] | 872 | # Sort branches by date |
| 873 | branch-sort=age |
| 874 | |
| 875 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 876 | # Add a cgit favicon |
| 877 | favicon=/favicon.ico |
| 878 | |
| 879 | |
| 880 | # Use a custom logo |
| 881 | logo=/img/mylogo.png |
| 882 | |
| 883 | |
Lars Hjemli | fb2f3f6 | 2008-12-07 13:17:21 +0100 | [diff] [blame] | 884 | # Enable statistics per week, month and quarter |
| 885 | max-stats=quarter |
| 886 | |
| 887 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 888 | # Set the title and heading of the repository index page |
Todd Zullinger | 66df113 | 2010-09-06 09:31:26 -0400 | [diff] [blame] | 889 | root-title=example.com git repositories |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 890 | |
| 891 | |
| 892 | # Set a subheading for the repository index page |
| 893 | root-desc=tracking the foobar development |
| 894 | |
| 895 | |
Todd Zullinger | 66df113 | 2010-09-06 09:31:26 -0400 | [diff] [blame] | 896 | # Include some more info about example.com on the index page |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 897 | root-readme=/var/www/htdocs/about.html |
| 898 | |
| 899 | |
Todd Zullinger | 3796c2d | 2009-01-11 18:23:39 -0500 | [diff] [blame] | 900 | # Allow download of tar.gz, tar.bz2 and zip-files |
| 901 | snapshots=tar.gz tar.bz2 zip |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 902 | |
| 903 | |
| 904 | ## |
Lars Hjemli | c4d46c7 | 2009-02-13 20:43:30 +0100 | [diff] [blame] | 905 | ## List of common mimetypes |
| 906 | ## |
| 907 | |
Johan Herland | 9ce5d05 | 2010-06-10 01:09:22 +0200 | [diff] [blame] | 908 | mimetype.gif=image/gif |
Lars Hjemli | c4d46c7 | 2009-02-13 20:43:30 +0100 | [diff] [blame] | 909 | mimetype.html=text/html |
| 910 | mimetype.jpg=image/jpeg |
| 911 | mimetype.jpeg=image/jpeg |
| 912 | mimetype.pdf=application/pdf |
| 913 | mimetype.png=image/png |
| 914 | mimetype.svg=image/svg+xml |
| 915 | |
| 916 | |
Přemysl Janouch | 88028ad | 2013-09-11 20:10:10 +0200 | [diff] [blame] | 917 | # Highlight source code with python pygments-based highlighter |
Jason A. Donenfeld | d6d3dbc | 2013-05-27 21:47:02 +0200 | [diff] [blame] | 918 | source-filter=/var/www/cgit/filters/syntax-highlighting.py |
| 919 | |
| 920 | # Format markdown, restructuredtext, manpages, text files, and html files |
| 921 | # through the right converters |
| 922 | about-filter=/var/www/cgit/filters/about-formatting.sh |
| 923 | |
| 924 | ## |
| 925 | ## Search for these files in the root of the default branch of repositories |
| 926 | ## for coming up with the about page: |
| 927 | ## |
| 928 | readme=:README.md |
| 929 | readme=:readme.md |
| 930 | readme=:README.mkd |
| 931 | readme=:readme.mkd |
| 932 | readme=:README.rst |
| 933 | readme=:readme.rst |
| 934 | readme=:README.html |
| 935 | readme=:readme.html |
| 936 | readme=:README.htm |
| 937 | readme=:readme.htm |
| 938 | readme=:README.txt |
| 939 | readme=:readme.txt |
| 940 | readme=:README |
| 941 | readme=:readme |
| 942 | readme=:INSTALL.md |
| 943 | readme=:install.md |
| 944 | readme=:INSTALL.mkd |
| 945 | readme=:install.mkd |
| 946 | readme=:INSTALL.rst |
| 947 | readme=:install.rst |
| 948 | readme=:INSTALL.html |
| 949 | readme=:install.html |
| 950 | readme=:INSTALL.htm |
| 951 | readme=:install.htm |
| 952 | readme=:INSTALL.txt |
| 953 | readme=:install.txt |
| 954 | readme=:INSTALL |
| 955 | readme=:install |
| 956 | |
| 957 | |
Lars Hjemli | c4d46c7 | 2009-02-13 20:43:30 +0100 | [diff] [blame] | 958 | ## |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 959 | ## List of repositories. |
Loui Chang | 8071e18 | 2009-09-14 01:21:11 -0400 | [diff] [blame] | 960 | ## PS: Any repositories listed when section is unset will not be |
| 961 | ## displayed under a section heading |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 962 | ## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos') |
| 963 | ## and included like this: |
| 964 | ## include=/etc/cgitrepos |
| 965 | ## |
| 966 | |
| 967 | |
| 968 | repo.url=foo |
| 969 | repo.path=/pub/git/foo.git |
| 970 | repo.desc=the master foo repository |
Todd Zullinger | 66df113 | 2010-09-06 09:31:26 -0400 | [diff] [blame] | 971 | repo.owner=fooman@example.com |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 972 | repo.readme=info/web/about.html |
| 973 | |
| 974 | |
| 975 | repo.url=bar |
| 976 | repo.path=/pub/git/bar.git |
| 977 | repo.desc=the bars for your foo |
Todd Zullinger | 66df113 | 2010-09-06 09:31:26 -0400 | [diff] [blame] | 978 | repo.owner=barman@example.com |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 979 | repo.readme=info/web/about.html |
| 980 | |
| 981 | |
| 982 | # The next repositories will be displayed under the 'extras' heading |
Loui Chang | 8071e18 | 2009-09-14 01:21:11 -0400 | [diff] [blame] | 983 | section=extras |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 984 | |
| 985 | |
| 986 | repo.url=baz |
| 987 | repo.path=/pub/git/baz.git |
| 988 | repo.desc=a set of extensions for bar users |
| 989 | |
| 990 | repo.url=wiz |
| 991 | repo.path=/pub/git/wiz.git |
| 992 | repo.desc=the wizard of foo |
| 993 | |
| 994 | |
| 995 | # Add some mirrored repositories |
Loui Chang | 8071e18 | 2009-09-14 01:21:11 -0400 | [diff] [blame] | 996 | section=mirrors |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 997 | |
| 998 | |
| 999 | repo.url=git |
| 1000 | repo.path=/pub/git/git.git |
| 1001 | repo.desc=the dscm |
| 1002 | |
| 1003 | |
| 1004 | repo.url=linux |
| 1005 | repo.path=/pub/git/linux.git |
| 1006 | repo.desc=the kernel |
| 1007 | |
| 1008 | # Disable adhoc downloads of this repo |
| 1009 | repo.snapshots=0 |
| 1010 | |
| 1011 | # Disable line-counts for this repo |
| 1012 | repo.enable-log-linecount=0 |
| 1013 | |
Lars Hjemli | fb2f3f6 | 2008-12-07 13:17:21 +0100 | [diff] [blame] | 1014 | # Restrict the max statistics period for this repo |
| 1015 | repo.max-stats=month |
Lars Hjemli | b875a9e | 2009-02-12 10:02:09 +0100 | [diff] [blame] | 1016 | .... |
Lars Hjemli | fb2f3f6 | 2008-12-07 13:17:21 +0100 | [diff] [blame] | 1017 | |
Lars Hjemli | df46123 | 2008-10-05 18:55:49 +0200 | [diff] [blame] | 1018 | |
| 1019 | BUGS |
| 1020 | ---- |
| 1021 | Comments currently cannot appear on the same line as a setting; the comment |
| 1022 | will be included as part of the value. E.g. this line: |
| 1023 | |
| 1024 | robots=index # allow indexing |
| 1025 | |
| 1026 | will generate the following html element: |
| 1027 | |
| 1028 | <meta name='robots' content='index # allow indexing'/> |
| 1029 | |
| 1030 | |
| 1031 | |
| 1032 | AUTHOR |
| 1033 | ------ |
| 1034 | Lars Hjemli <hjemli@gmail.com> |
Jason A. Donenfeld | 2e4a941 | 2010-07-29 19:47:50 +0200 | [diff] [blame] | 1035 | Jason A. Donenfeld <Jason@zx2c4.com> |