blob: 2dd738bf2af72bae972bc76ab21bfcc723f04c1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
# cgitrc reference configuration
#
# This file lists every cgit configuration option set to its default value.
# Options with a real default are left uncommented at that default. Options that
# are site-specific are commented out with a realistic example and their default
# noted in the comment. Copied as-is, cgit behaves as if no option were set.
#
# Quick start. The one thing you must set to see any repositories is where they
# live. Uncomment scan-path further down and point it at your git directory, or
# list repositories by hand in the per-repository section at the end of this
# file.
#
# About pages (markdown, man and plain-text readmes) can render through the
# bundled about-render.lua about-filter in the filter section below. Source
# syntax highlighting is optional and ships as a source-filter there too.
#
# One key=value pair per line. Lines starting with # or ; are comments.

# Maximum number of entries in the cgit output cache. A value of 0 disables
# caching. Value is an integer. Default is 0.
cache-size=0

# Directory used to store cgit cache entries. Value is a filesystem path that
# may use macros. Default is /var/cache/cgit. The directory must be owned by the
# account the web server runs cgit as, with mode 0700, since the cache holds
# every rendered page and the URLs visitors asked for.
cache-root=/var/cache/cgit

# Minutes to cache the repository index page. Value is an integer number of
# minutes. Default is 5.
cache-index-ttl=5

# Minutes to cache the repository summary page. Value is an integer number of
# minutes. Default is 5.
cache-summary-ttl=5

# Minutes to cache the result of scanning a path for repositories. Value is an
# integer number of minutes. Default is 15.
cache-scan-ttl=15

# Minutes to cache repository pages requested with a fixed object id. A negative
# value keeps the page forever. Value is an integer number of minutes. Default
# is -1.
cache-static-ttl=-1

# Minutes to cache repository pages requested without a fixed object id. Value
# is an integer number of minutes. Default is 5.
cache-dynamic-ttl=5

# Minutes to cache the repository about page. Value is an integer number of
# minutes. Default is 15.
cache-about-ttl=15

# Minutes to cache snapshots. Value is an integer number of minutes. Default is
# 5.
cache-snapshot-ttl=5

# Largest response, in kilobytes, that a cache slot keeps. A larger one is
# served but not kept. Value is an integer, and 0 removes the limit. Default is
# 65536.
cache-max-slot-size=65536

# Expose the ls_cache page, which lists cache paths and the urls other visitors
# requested. Values are 0 or 1. Default is 0.
enable-cache-list=0

# Heading text on the repository index page. Value is any text. Default is Git
# repository browser.
root-title=Git repository browser

# Subheading text below the index page heading. Value is any text. Default is a
# fast webinterface for the git dscm.
root-desc=a fast webinterface for the git dscm

# File included verbatim below the about link on the index page. Value is a
# filesystem path. Default is none.
#root-readme=/var/www/htdocs/about.html

# Default value or values for repo.readme. The first existing file wins. Value
# is one or more [ref]path entries. Default is none.
#readme=:README.md

# CSS document urls added to the head of every page. An empty value disables it.
# Value is one or more urls. Default is /cgit.css.
css=/cgit.css

# JavaScript document urls included on every page. An empty value disables it.
# Value is one or more urls. Default is /cgit.js.
js=/cgit.js

# Shortcut icon url for all pages. Value is a url. Default is /favicon.ico.
favicon=/favicon.ico

# Image url used as the logo on all pages. Value is a url. Default is /cgit.png.
logo=/cgit.png

# Url loaded when clicking the logo. Value is a url. Default is the repository
# index url.
#logo-link=/

# File included verbatim at the top of all pages. Value is a filesystem path.
# Default is none.
#header=/var/www/htdocs/cgit-header.html

# File included verbatim at the bottom of all pages, replacing the generated-by
# line. Value is a filesystem path. Default is none.
#footer=/var/www/htdocs/cgit-footer.html

# File included verbatim in the HTML head of all pages. Value is a filesystem
# path. Default is none.
#head-include=/var/www/htdocs/cgit-head.html

# Content of the robots meta tag. Value is robots meta content. Default is
# index, nofollow.
robots=index, nofollow

# Draw the standard page header. Set to 0 to omit it, for example when
# embedding. Values are 0 or 1. Default is 1.
enable-header=1

# Generate an HTML fragment suitable for embedding in other pages. Values are 0
# or 1. Default is 0.
embedded=0

# Root url for all cgit links, enabling virtual urls. Value is a url path.
# Default is none.
#virtual-root=/

# Link format string for submodules in directory listings. Value is a printf
# format string taking path and object id. Default is none.
#module-link=/%s/commit/?id=%s

# Directory scanned for git repositories at parse time. Value is a filesystem
# path that may use macros. Default is none.
#scan-path=/var/lib/git

# When scanning, recurse into dot-directories. Must precede scan-path. Values
# are 0 or 1. Default is 0.
scan-hidden-path=0

# Derive default section names from N leading path elements. Must precede
# scan-path. Value is an integer that may be negative. Default is 0.
section-from-path=0

# Strip the .git suffix from a scanned repository's url and name. Must precede
# scan-path. Values are 0 or 1. Default is 0.
remove-suffix=0

# File listing subdirs of scan-path to load. Must precede scan-path. Value is a
# filesystem path that may use macros. Default is none.
#project-list=/var/lib/git/projects.list

# Serve a repository only if this file exists inside it. Emulates gitweb
# EXPORT_OK. The reverse needs no setting, a repository containing a file named
# "noweb" is always skipped by the scan. Must precede scan-path. Value is a
# filename. Default is none.
#strict-export=git-daemon-export-ok

# Section heading that subsequently defined repositories inherit. Value is any
# section heading text. Default is none.
#section=main

# Sort sections and the repositories within them by name rather than file order.
# Values are 0 or 1. Default is 0.
section-sort=0

# How repositories within a section are sorted. Values are name or age. Default
# is name.
repository-sort=name

# Let a scanned repository set cgit settings through its git config, using
# gitweb.* or cgit.* keys. Values are 0 or 1. Default is 0.
enable-git-config=0

# Include another config file before continuing to parse this one. Value is a
# filesystem path that may use macros. Default is none.
#include=/etc/cgitrc.d/extra

# Provide a blame page for files and links to it. Values are 0 or 1. Default is
# 0.
enable-blame=0

# Print an ASCII-art commit history graph in the log page. Values are 0 or 1.
# Default is 0.
enable-commit-graph=0

# Split the trailer block, the Signed-off-by lines and their kin, off the end of
# a commit message and show it as a table on the commit page. Values are 0 or 1.
# Default is 0.
enable-commit-trailers=0

# Allow following a file across renames in the log page. Values are 0 or 1.
# Default is 0.
enable-follow-links=0

# Derive submodule links from the .gitmodules file for submodules that no
# module-link template covers. Values are 0 or 1. Default is 0.
enable-gitmodules-links=0

# Generate extra summary, commit and tree links per repository on the index.
# Values are 0 or 1. Default is 0.
enable-index-links=0

# Show the owner of each repository on the index page. Values are 0 or 1.
# Default is 1.
enable-index-owner=1

# Show the number of modified files per commit in the log. Values are 0 or 1.
# Default is 0.
enable-log-filecount=0

# Show added and removed line counts per commit in the log. Values are 0 or 1.
# Default is 0.
enable-log-linecount=0

# Apply the .mailmap at HEAD to every author, committer and tagger shown, so a
# person who changed name or address appears under one identity. Values are 0 or
# 1. Default is 1.
enable-mailmap=1

# Show ages in the log, refs and index columns as an elapsed time such as "3
# days" rather than a calendar date. Values are 0 or 1. Default is 1.
enable-relative-dates=1

# Display remote branches in the summary and refs pages. Values are 0 or 1.
# Default is 0.
enable-remote-branches=0

# Use the parent commit subject as link text for parent links. Values are 0 or
# 1. Default is 0.
enable-subject-links=0

# Allow /plain to serve HTML mimetypes instead of downgrading to text/plain.
# Values are 0 or 1. Default is 0.
enable-html-serving=0

# Generate line-number links for plaintext blobs in the tree page. Values are 0
# or 1. Default is 1.
enable-tree-linenumbers=1

# List directories first, then files, in the tree page. Values are 0 or 1.
# Default is 0.
enable-tree-group-dirs=0

# Enable the statistics page, which counts commits per author, and set the
# coarsest period it offers. Each value also offers the finer periods before it.
# Leaving it out disables statistics. Values are week, month, quarter or year.
# Default is none.
#max-stats=year

# Default set of snapshot archive formats to offer. Value is a space-separated
# list of tar tar.gz tar.bz2 tar.lz tar.xz tar.zst zip, or the word all. Default
# is none.
#snapshots=tar.gz tar.xz zip

# Act as a dumb HTTP endpoint for git clones. Values are 0 or 1. Default is 1.
enable-http-clone=1

# Prefixes combined with the repository url to build clone urls. Used only when
# repo.clone-url is unset. Value is space-separated url prefixes. Default is
# none.
#clone-prefix=https://example.com/git git://example.com

# Clone-url templates used when repo.clone-url is unset. Value is
# space-separated url templates that may use macros. Default is none.
#clone-url=https://example.com/$CGIT_REPO_URL git://example.com/$CGIT_REPO_URL

# A filter is an external command cgit runs to transform a piece of content.
# Prefix the command with lua: to run it through the built-in Lua interpreter,
# which avoids a fork per call, or with exec: to run a normal program. The
# commands below that point at /usr/local/lib/cgit/filters/ use scripts this
# repository ships under custom/extensions/. The ones written as
# /path/to/your-command mark where your own command goes.

# Honour every setting in a repository's own cgitrc and git config found by
# scan-path. Those files belong to whoever can push, so without this the
# settings that run a command, put raw markup on the page, serve a file as
# markup, place a link or read a file off the disk are ignored. The repo.* lines
# below never need it. Values are 0 or 1. Default is 0.
trust-scan-config=0

# Filter command used to format about-page content. The bundled about-render.lua
# renders markdown, man pages and plain text. Value is a command optionally
# prefixed with exec or lua. Default is none.
#about-filter=lua:/usr/local/lib/cgit/filters/about-render.lua

# Filter command used to format commit messages, for example to turn object
# names and issue numbers into links. Value is a command optionally prefixed
# with exec or lua. Default is none.
#commit-filter=lua:/usr/local/lib/cgit/filters/link-commits.lua

# Filter command used to format author and committer emails, for example to add
# avatar images. Value is a command optionally prefixed with exec or lua.
# Default is none.
#email-filter=lua:/usr/local/lib/cgit/filters/email-gravatar.lua

# Filter command used to format the value of a commit trailer when
# enable-commit-trailers is 1. The shipped filter links Fixes, Closes and URL
# values. Value is a command optionally prefixed with exec or lua. Default is
# none.
#trailer-filter=lua:/usr/local/lib/cgit/filters/link-trailers.lua

# Filter command used to format plaintext blobs in the tree page. The shipped
# filter uses the Scintillua lexers and needs lpeg, and missing either means
# plain uncolored text, not an error. Value is a command optionally prefixed
# with exec or lua. Default is none.
#source-filter=lua:/usr/local/lib/cgit/filters/syntax-highlight.lua

# Filter command invoked to authenticate access, gating repositories behind a
# login. See custom/extensions/auth-inline.lua and
# custom/extensions/auth-file.lua. Value is a command optionally prefixed with
# exec or lua. Default is none.
#auth-filter=lua:/usr/local/lib/cgit/filters/auth-inline.lua

# Number of items to display in atom feeds. Value is an integer. Default is 10.
max-atom-items=10

# Max commit message characters shown in the log page. Value is an integer.
# Default is 80.
max-message-length=80

# Max repository description characters shown on the index page. Value is an
# integer. Default is 80.
max-repodesc-length=80

# Max blob size in KBytes read into memory for html, plain and blob output. A
# value of 0 disables the limit. Value is an integer. Default is 10240.
max-blob-size=10240

# Number of repositories listed per page on the index. Zero or a negative value
# shows them all. Value is an integer. Default is 50.
max-repo-count=50

# Number of log entries listed per page in the log page. Value is an integer.
# Default is 50.
max-commit-count=50

# Maximum number of commits the patch page emits as a series for an explicit
# revision range. A single commit is unaffected. A value of 0 removes the limit.
# Value is an integer. Default is 50.
max-patch-count=50

# Commits changing more files than this render as a diffstat, where each file
# links to its own diff page. A value of 0 always renders everything inline.
# Value is an integer. Default is 200.
max-diff-files=200

# A file whose diff spans more lines than this is replaced by a link to its own
# diff page in whole-commit pages. A value of 0 always renders it inline. Value
# is an integer. Default is 1000.
max-diff-lines=1000

# Branches and tags listed per section on the refs page, and per page on the
# dedicated branch and tag pages. A value of 0 lists everything on one page.
# Value is an integer. Default is 200.
max-ref-count=200

# Max files considered when detecting renames. A value of -1 uses the git
# compile-time value. Value is an integer. Default is -1.
rename-limit=-1

# Number of log entries shown in the summary page. Value is an integer. Default
# is 10.
summary-log=10

# Number of branches shown in the summary page. Value is an integer. Default is
# 10.
summary-branches=10

# Number of tags shown in the summary page. Value is an integer. Default is 10.
summary-tags=10

# Show side-by-side diffs instead of unidiffs by default. Values are 0 or 1.
# Default is 0.
side-by-side-diffs=0

# Print commit and tag times in the server timezone. Values are 0 or 1. Default
# is 0.
local-time=0

# Format for the calendar dates in the age columns. Accepts the names git takes
# for --date, such as short, iso8601, rfc2822, human and unix, each of which may
# carry a -local suffix, plus format:<strftime>. Default is short.
date-format=short

# Ordering of commits in the log page. Leaving it out uses the git log default.
# Values are date or topo. Default is none.
#commit-sort=date

# Ordering of the branch ref list. Values are name or age. Default is name.
branch-sort=name

# Sort items in the repository list case-sensitively. Values are 0 or 1.
# Default is 1.
case-sensitive-sort=1

# Show full author email addresses beside names. Values are 0 or 1. Default is
# 1.
enable-plain-email=1

# File giving the timestamp of the youngest commit. Value is a path relative to
# the repository. Default is info/web/last-modified.
age-file=info/web/last-modified

# Fallback mimetype lookup file for plain output. Value is a filesystem path.
# Default is none.
#mimetype-file=/etc/mime.types

# Mimetype for a given filename extension, used by plain output. Value is a
# mimetype string keyed by extension. Default is none.
#mimetype.gif=image/gif
#mimetype.html=text/html
#mimetype.jpg=image/jpeg
#mimetype.pdf=application/pdf
#mimetype.png=image/png
#mimetype.svg=image/svg+xml

# Each repository is introduced by a repo.url line. All following repo.*
# settings apply to that repository until the next repo.url line. When
# repositories are discovered via scan-path the repo. prefix is dropped inside
# each repository's cgitrc, and repo.url and repo.path are not allowed there.

# Relative url for a repository. Must be the first setting of each repository
# block. Value is a relative url path. Default is none.
#repo.url=example

# Absolute path to the repository. For a non-bare repository this is the .git
# directory. Value is an absolute filesystem path. Default is none.
#repo.path=/var/lib/git/example.git

# Display name of the repository. Value is any text. Default is the repository
# url.
#repo.name=example

# Repository description. Value is any text. Default is "[no description]".
#repo.desc=An example repository

# Repository owner identifier. Value is any text. Default is none.
#repo.owner=Jane Doe

# Urls used to clone this repository. Value is space-separated urls that may use
# macros. Default is none.
#repo.clone-url=https://example.com/example.git git://example.com/example.git

# Default branch for the repository. Falls back to the first sorted branch.
# Value is a branch name. Default is the HEAD branch, or master.
#repo.defbranch=master

# Override the current section name for this repository. Value is a section
# name. Default is none.
#repo.section=main

# Prefix for snapshot filenames instead of the repository basename. Value is a
# prefix string. Default is none.
#repo.snapshot-prefix=example

# Extra content added verbatim to the head of each page for this repository.
# Value is an HTML fragment. Default is none.
#repo.head-content=<meta name="example" content="value">

# File included verbatim as the repository About page. A colon-prefixed value
# uses the head or defbranch. Value is a [ref]path entry. Default is the global
# readme value.
#repo.readme=:README.md

# Per-repository logo image url. Value is a url. Default is the global logo
# value.
#repo.logo=/cgit.png

# Per-repository logo link target url. Value is a url. Default is the global
# logo-link value.
#repo.logo-link=/

# Per-repository submodule link format string. Value is a printf format string
# taking path and object id. Default is the global module-link value.
#repo.module-link=/%s/commit/?id=%s

# Submodule link format for a specific submodule path. Value is a printf format
# string taking an object id. Default is none.
#repo.module-link.path/to/sub=https://example.com/sub/commit/?id=%s

# Snapshot formats offered for this repository, restricted by the global mask.
# A value of 0 disables snapshots. Value is snapshot formats. Default is the
# global snapshots value.
#repo.snapshots=tar.gz zip

# Hide the repository from the index but still allow direct access. Values are
# 0 or 1. Default is 0.
#repo.hide=0

# Ignore the repository entirely so it is not indexed and not directly
# accessible. Values are 0 or 1. Default is 0.
#repo.ignore=0

# Per-repository override of enable-blame. Values are 0 or 1. Default is the
# global enable-blame value.
#repo.enable-blame=0

# Per-repository override of enable-commit-graph. Values are 0 or 1. Default is
# the global enable-commit-graph value.
#repo.enable-commit-graph=0

# Per-repository override of enable-commit-trailers. Values are 0 or 1. Default
# is the global enable-commit-trailers value.
#repo.enable-commit-trailers=0

# Per-repository override of enable-follow-links. Values are 0 or 1. Default is
# the global enable-follow-links value.
#repo.enable-follow-links=0

# Per-repository override of enable-gitmodules-links. Values are 0 or 1.
# Default is the global enable-gitmodules-links value.
#repo.enable-gitmodules-links=0

# Per-repository override of enable-log-filecount. Values are 0 or 1. Default is
# the global enable-log-filecount value.
#repo.enable-log-filecount=0

# Per-repository override of enable-log-linecount. Values are 0 or 1. Default is
# the global enable-log-linecount value.
#repo.enable-log-linecount=0

# Per-repository override of enable-mailmap. Values are 0 or 1. Default is the
# global enable-mailmap value.
#repo.enable-mailmap=1

# Per-repository override of enable-remote-branches. Values are 0 or 1. Default
# is the global enable-remote-branches value.
#repo.enable-remote-branches=0

# Per-repository override of enable-subject-links. Values are 0 or 1. Default is
# the global enable-subject-links value.
#repo.enable-subject-links=0

# Per-repository override of enable-html-serving. Values are 0 or 1. Default is
# the global enable-html-serving value.
#repo.enable-html-serving=0

# Per-repository branch ref list ordering. Values are name or age. Default is
# name.
#repo.branch-sort=name

# Per-repository commit log ordering. Leaving it out uses the git log default.
# Values are date or topo. Default is none.
#repo.commit-sort=date

# Per-repository maximum statistics period. A value of 0 disables the statistics
# page for this repository. Values are week, month, quarter, year or 0. Default
# is the global max-stats value.
#repo.max-stats=week

# Per-repository override of the about-filter. Value is a command. Default is
# the global about-filter value.
#repo.about-filter=exec:/path/to/your-command

# Per-repository override of the commit-filter. Value is a command. Default is
# the global commit-filter value.
#repo.commit-filter=lua:/usr/local/lib/cgit/filters/link-commits.lua

# Per-repository override of the source-filter. Value is a command. Default is
# the global source-filter value.
#repo.source-filter=exec:/path/to/your-command

# Per-repository override of the email-filter. Value is a command. Default is
# the global email-filter value.
#repo.email-filter=lua:/usr/local/lib/cgit/filters/email-gravatar.lua

# Per-repository override of the trailer-filter. Value is a command. Default is
# the global trailer-filter value.
#repo.trailer-filter=lua:/usr/local/lib/cgit/filters/link-trailers.lua