diff options
Diffstat (limited to 'examples/cgitrc')
| -rw-r--r-- | examples/cgitrc | 548 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 548 insertions, 0 deletions
diff --git a/examples/cgitrc b/examples/cgitrc new file mode 100644 index 0000000..f65c310 --- /dev/null +++ b/examples/cgitrc @@ -0,0 +1,548 @@ +# 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. +# +# In this fork, markdown readmes and source syntax highlighting are built in +# and rendered in the browser, so you need no about-filter or source-filter +# for them. +# +# One key=value pair per line. Lines starting with # are comments. + + +## +## Cache +## + +# 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. +#cache-root=/var/cache/cgit + +# Minutes to cache the repository index page. Value is an integer number of +# minutes. Default is 5. +cache-root-ttl=5 + +# Minutes to cache the repository summary page. Value is an integer number of +# minutes. Default is 5. +cache-repo-ttl=5 + +# Minutes to cache the result of scanning a path for repositories. Value is an +# integer number of minutes. Default is 15. +cache-scanrc-ttl=15 + +# Minutes to cache repo pages requested with a fixed SHA1. A negative value +# never expires. Value is an integer number of minutes. Default is -1. +cache-static-ttl=-1 + +# Minutes to cache repo pages requested without a fixed SHA1. 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 + +# 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 + + +## +## Site appearance +## + +# 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. 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 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 + +# Omit the standard page header when set. Values are 0 or 1. Default is 0. +noheader=0 + +# 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 sha1. Default is none. +#module-link=/%s/commit/?id=%s + + +## +## Repository discovery +## + +# 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 scanned repo 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 repo only if this file exists inside it. Emulates gitweb EXPORT_OK. +# Must precede scan-path. Value is a filename. Default is none. +#strict-export=git-daemon-export-ok + +# Section heading that subsequently-defined repos inherit. Value is any section +# heading text. Default is none. +#section=main + +# Sort sections and repos 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 scanned repos set cgit settings via 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 + + +## +## Features +## + +# 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 + +# Allow following a file across renames in the log view. Values are 0 or 1. +# Default is 0. +enable-follow-links=0 + +# Generate extra summary, commit and tree links per repo on the index. Values +# are 0 or 1. Default is 0. +enable-index-links=0 + +# Show the owner of each repo 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 + +# Display remote branches in summary and refs views. 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 view. Values are +# 0 or 1. Default is 1. +enable-tree-linenumbers=1 + +# List directories first, then files, in the tree view. Values are 0 or 1. +# Default is 0. +enable-tree-group-dirs=0 + +# Render a markdown readme client-side on the about page. Values are 0 or 1. +# Default is 1. +enable-markdown=1 + +# Default maximum statistics period. Leaving this unset disables statistics. +# Values are week, month, quarter or year. Default is unset. +#max-stats=week + + +## +## Snapshots and cloning +## + +# Default set of snapshot archive formats to offer. Value is a space 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 repo 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 + + +## +## Filters +## +# +# 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/share/cgit/extensions/ use scripts this +# repository ships under extensions/. The ones written as /path/to/your-command +# mark where your own command goes. + +# Allow filter settings to be overridden in per-repo cgitrc files. Values are +# 0 or 1. Default is 0. +enable-filter-overrides=0 + +# Filter command used to format about-page content. Markdown already renders +# in the browser, so this is only for other formats such as man pages. Value +# is a command optionally prefixed with exec or lua. Default is none. +#about-filter=exec:/path/to/your-command + +# 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/share/cgit/extensions/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/share/cgit/extensions/email-gravatar.lua + +# Filter command used to format the Owner column. The owner is shown without +# a filter, so this only reformats it. Value is a command optionally prefixed +# with exec or lua. Default is none. +#owner-filter=exec:/path/to/your-command + +# Filter command used to format plaintext blobs in the tree view. Syntax +# highlighting is already built in, so set this only to replace it. Value is +# a command optionally prefixed with exec or lua. Default is none. +#source-filter=exec:/path/to/your-command + +# Filter command invoked to authenticate access, gating repositories behind a +# login. See extensions/auth-inline.lua and extensions/auth-file.lua. Value +# is a command optionally prefixed with exec or lua. Default is none. +#auth-filter=lua:/usr/share/cgit/extensions/auth-inline.lua + + +## +## Limits and safety +## + +# 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 view. Value is an integer. +# Default is 80. +max-message-length=80 + +# Max repo 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 repos listed per page on the index. A value of 0 or negative shows +# all repos. Value is an integer. Default is 50. +max-repo-count=50 + +# Number of log entries listed per page in the log view. Value is an integer. +# Default is 50. +max-commit-count=50 + +# Max files considered when detecting renames. A value of -1 uses the git +# compile-time value. Value is an integer. Default is -1. +renamelimit=-1 + + +## +## Presentation +## + +# Number of log entries shown in the summary view. Value is an integer. +# Default is 10. +summary-log=10 + +# Number of branches shown in the summary view. Value is an integer. +# Default is 10. +summary-branches=10 + +# Number of tags shown in the summary view. 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 + +# Ordering of commits in the log view. Leaving this unset uses the git log +# default. Values are date or topo. Default is unset. +#commit-sort=date + +# Ordering of the branch ref list. Values are name or age. Default is name. +branch-sort=name + +# Sort items in the repo list case-sensitively. Values are 0 or 1. Default is 1. +case-sensitive-sort=1 + +# Hide full author email addresses when set. Values are 0 or 1. Default is 0. +noplainemail=0 + +# File giving the timestamp of the youngest commit. Value is a path relative to +# the repo. Default is info/web/last-modified. +#agefile=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 + + +## +## Per-repository overrides +## +# +# Each repository is introduced by a repo.url line, which must be the first +# setting of the block. All following repo.* settings apply to that repo until +# the next repo.url line. When repos are discovered via scan-path the repo. +# prefix is dropped inside each repo cgitrc and repo.url and repo.path are not +# allowed there. + +# Relative url for a repo. Must be the first setting of each repo block. Value +# is a relative url path. Default is none. +#repo.url=example + +# Absolute path to the repository. For a non-bare repo this is the .git dir. +# 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 repo url. +#repo.name=example + +# Repository description. Value is any text. Default is none. +#repo.desc=An example repository + +# Repository owner identifier. Value is any text. Default is none. +#repo.owner=Jane Doe + +# Repository homepage value. Value is a url or text. Default is none. +#repo.homepage=https://example.com/ + +# Urls used to clone this repo. 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 repo. 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 repo. Value is a section name. +# Default is none. +#repo.section=main + +# Prefix for snapshot filenames instead of the repo 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 repo. Value is +# an HTML fragment. Default is none. +#repo.extra-head-content=<meta name="example" content="value"> + +# File included verbatim as the repo 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-repo logo image url. Value is a url. Default is the global logo value. +#repo.logo=/cgit.png + +# Per-repo logo link target url. Value is a url. Default is the global +# logo-link value. +#repo.logo-link=/ + +# Per-repo submodule link format string. Value is a printf format string taking +# path and sha1. 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 sha1. Default is none. +#repo.module-link.path/to/sub=https://example.com/sub/commit/?id=%s + +# Snapshot formats offered for this repo, 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 repo from the index but still allow direct access. Values are +# 0 or 1. Default is 0. +#repo.hide=0 + +# Ignore the repo entirely so it is not indexed and not directly accessible. +# Values are 0 or 1. Default is 0. +#repo.ignore=0 + +# Per-repo override of enable-blame. Values are 0 or 1. Default is the global +# enable-blame value. +#repo.enable-blame=0 + +# Per-repo override of enable-commit-graph. Values are 0 or 1. Default is the +# global enable-commit-graph value. +#repo.enable-commit-graph=0 + +# Per-repo override of enable-follow-links. Values are 0 or 1. Default is the +# global enable-follow-links value. +#repo.enable-follow-links=0 + +# Per-repo override of enable-log-filecount. Values are 0 or 1. Default is the +# global enable-log-filecount value. +#repo.enable-log-filecount=0 + +# Per-repo override of enable-log-linecount. Values are 0 or 1. Default is the +# global enable-log-linecount value. +#repo.enable-log-linecount=0 + +# Per-repo override of enable-remote-branches. Values are 0 or 1. Default is +# the global enable-remote-branches value. +#repo.enable-remote-branches=0 + +# Per-repo override of enable-subject-links. Values are 0 or 1. Default is the +# global enable-subject-links value. +#repo.enable-subject-links=0 + +# Per-repo override of enable-html-serving. Values are 0 or 1. Default is the +# global enable-html-serving value. +#repo.enable-html-serving=0 + +# Per-repo branch ref list ordering. Values are name or age. Default is name. +#repo.branch-sort=name + +# Per-repo commit log ordering. Leaving this unset uses the git log default. +# Values are date or topo. Default is unset. +#repo.commit-sort=date + +# Per-repo maximum statistics period. Values are week, month, quarter or year. +# Default is the global max-stats value. +#repo.max-stats=week + +# Per-repo override of the about-filter. Allowed in a repo cgitrc only when +# enable-filter-overrides is 1. Value is a command. Default is the global +# about-filter value. +#repo.about-filter=exec:/path/to/your-command + +# Per-repo override of the commit-filter. Allowed in a repo cgitrc only when +# enable-filter-overrides is 1. Value is a command. Default is the global +# commit-filter value. +#repo.commit-filter=lua:/usr/share/cgit/extensions/link-commits.lua + +# Per-repo override of the source-filter. Allowed in a repo cgitrc only when +# enable-filter-overrides is 1. Value is a command. Default is the global +# source-filter value. +#repo.source-filter=exec:/path/to/your-command + +# Per-repo override of the email-filter. Allowed in a repo cgitrc only when +# enable-filter-overrides is 1. Value is a command. Default is the global +# email-filter value. +#repo.email-filter=lua:/usr/share/cgit/extensions/email-gravatar.lua + +# Per-repo override of the owner-filter. Allowed in a repo cgitrc only when +# enable-filter-overrides is 1. Value is a command. Default is the global +# owner-filter value. +#repo.owner-filter=exec:/path/to/your-command
\ No newline at end of file |
