Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > aff99b0e00a2e2addc31ab9e89af9e00 > files > 35

cgit-1.2.1-4.mga7.armv7hl.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 8.6.9" />
<title>CGITRC(5)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */

/* Default font. */
body {
  font-family: Georgia,serif;
}

/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
  font-family: Arial,Helvetica,sans-serif;
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}
h5 {
  font-size: 1.0em;
}

div.sectionbody {
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}
ul > li     { color: #aaa; }
ul > li > * { color: black; }

.monospaced, code, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: inherit;
  color: navy;
  padding: 0;
  margin: 0;
}
pre {
  white-space: pre-wrap;
}

#author {
  color: #527bbd;
  font-weight: bold;
  font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}

#footer {
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid #dddddd;
  border-left: 4px solid #f0f0f0;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid #dddddd;
  border-left: 5px solid #f0f0f0;
  background: #f8f8f8;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #f0f0f0;
  color: #888;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > pre.content {
  font-family: inherit;
  font-size: inherit;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}

div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}

div.colist td {
  padding-right: 0.5em;
  padding-bottom: 0.3em;
  vertical-align: top;
}
div.colist td img {
  margin-top: 0.3em;
}

@media print {
  #footer-badges { display: none; }
}

#toc {
  margin-bottom: 2.5em;
}

#toctitle {
  color: #527bbd;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}

span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }

span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }

span.big { font-size: 2em; }
span.small { font-size: 0.6em; }

span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }

div.unbreakable { page-break-inside: avoid; }


/*
 * xhtml11 specific
 *
 * */

div.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-weight: bold;
  color: #527bbd;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overriden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


/*
 * html5 specific
 *
 * */

table.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
thead, p.tableblock.header {
  font-weight: bold;
  color: #527bbd;
}
p.tableblock {
  margin-top: 0;
}
table.tableblock {
  border-width: 3px;
  border-spacing: 0px;
  border-style: solid;
  border-color: #527bbd;
  border-collapse: collapse;
}
th.tableblock, td.tableblock {
  border-width: 1px;
  padding: 4px;
  border-style: solid;
  border-color: #527bbd;
}

table.tableblock.frame-topbot {
  border-left-style: hidden;
  border-right-style: hidden;
}
table.tableblock.frame-sides {
  border-top-style: hidden;
  border-bottom-style: hidden;
}
table.tableblock.frame-none {
  border-style: hidden;
}

th.tableblock.halign-left, td.tableblock.halign-left {
  text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
  text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
  text-align: right;
}

th.tableblock.valign-top, td.tableblock.valign-top {
  vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
  vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
  vertical-align: bottom;
}


/*
 * manpage specific
 *
 * */

body.manpage h1 {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-top: 2px solid silver;
  border-bottom: 2px solid silver;
}
body.manpage h2 {
  border-style: none;
}
body.manpage div.sectionbody {
  margin-left: 3em;
}

@media print {
  body.manpage div#toc { display: none; }
}


</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  if (!toc) {
    return;
  }

  // Delete existing TOC entries in case we're reloading the TOC.
  var tocEntriesToRemove = [];
  var i;
  for (i = 0; i < toc.childNodes.length; i++) {
    var entry = toc.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div'
     && entry.getAttribute("class")
     && entry.getAttribute("class").match(/^toclevel/))
      tocEntriesToRemove.push(entry);
  }
  for (i = 0; i < tocEntriesToRemove.length; i++) {
    toc.removeChild(tocEntriesToRemove[i]);
  }

  // Rebuild TOC entries.
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  // Delete existing footnote entries in case we're reloading the footnodes.
  var i;
  var noteholder = document.getElementById("footnotes");
  if (!noteholder) {
    return;
  }
  var entriesToRemove = [];
  for (i = 0; i < noteholder.childNodes.length; i++) {
    var entry = noteholder.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
      entriesToRemove.push(entry);
  }
  for (i = 0; i < entriesToRemove.length; i++) {
    noteholder.removeChild(entriesToRemove[i]);
  }

  // Rebuild footnote entries.
  var cont = document.getElementById("content");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      var note = spans[i].getAttribute("data-note");
      if (!note) {
        // Use [\s\S] in place of . so multi-line matches work.
        // Because JavaScript has no s (dotall) regex flag.
        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
        spans[i].innerHTML =
          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
        spans[i].setAttribute("data-note", note);
      }
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
},

install: function(toclevels) {
  var timerId;

  function reinstall() {
    asciidoc.footnotes();
    if (toclevels) {
      asciidoc.toc(toclevels);
    }
  }

  function reinstallAndRemoveTimer() {
    clearInterval(timerId);
    reinstall();
  }

  timerId = setInterval(reinstall, 500);
  if (document.addEventListener)
    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
  else
    window.onload = reinstallAndRemoveTimer;
}

}
asciidoc.install();
/*]]>*/
</script>
</head>
<body class="article">
<div id="header">
<h1>CGITRC(5)</h1>
</div>
<div id="content">
<div class="sect1">
<h2 id="_name">NAME</h2>
<div class="sectionbody">
<div class="paragraph"><p>cgitrc - runtime configuration for cgit</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph"><p>Cgitrc contains all runtime settings for cgit, including the list of git
repositories, formatted as a line-separated list of NAME=VALUE pairs. Blank
lines, and lines starting with <em>#</em>, are ignored.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_location">LOCATION</h2>
<div class="sectionbody">
<div class="paragraph"><p>The default location of cgitrc, defined at compile time, is /etc/cgitrc. At
runtime, cgit will consult the environment variable CGIT_CONFIG and, if
defined, use its value instead.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_global_settings">GLOBAL SETTINGS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
about-filter
</dt>
<dd>
<p>
        Specifies a command which will be invoked to format the content of
        about pages (both top-level and for each repository). The command will
        get the content of the about-file on its STDIN, the name of the file
        as the first argument, and the STDOUT from the command will be
        included verbatim on the about page. Default value: none. See
        also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
agefile
</dt>
<dd>
<p>
        Specifies a path, relative to each repository path, which can be used
        to specify the date and time of the youngest commit in the repository.
        The first line in the file is used as input to the "parse_date"
        function in libgit. Recommended timestamp-format is "yyyy-mm-dd
        hh:mm:ss". You may want to generate this file from a post-receive
        hook. Default value: "info/web/last-modified".
</p>
</dd>
<dt class="hdlist1">
auth-filter
</dt>
<dd>
<p>
        Specifies a command that will be invoked for authenticating repository
        access. Receives quite a few arguments, and data on both stdin and
        stdout for authentication processing. Details follow later in this
        document. If no auth-filter is specified, no authentication is
        performed. Default value: none. See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
branch-sort
</dt>
<dd>
<p>
        Flag which, when set to "age", enables date ordering in the branch ref
        list, and when set to "name" enables ordering by branch name. Default
        value: "name".
</p>
</dd>
<dt class="hdlist1">
cache-about-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository about page. See also: "CACHE". Default
        value: "15".
</p>
</dd>
<dt class="hdlist1">
cache-dynamic-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of repository pages accessed without a fixed SHA1. See also:
        "CACHE". Default value: "5".
</p>
</dd>
<dt class="hdlist1">
cache-repo-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository summary page. See also: "CACHE". Default
        value: "5".
</p>
</dd>
<dt class="hdlist1">
cache-root
</dt>
<dd>
<p>
        Path used to store the cgit cache entries. Default value:
        "/var/cache/cgit". See also: "MACRO EXPANSION".
</p>
</dd>
<dt class="hdlist1">
cache-root-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of the repository index page. See also: "CACHE". Default
        value: "5".
</p>
</dd>
<dt class="hdlist1">
cache-scanrc-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the result
        of scanning a path for git repositories. See also: "CACHE". Default
        value: "15".
</p>
</dd>
<dt class="hdlist1">
case-sensitive-sort
</dt>
<dd>
<p>
        Sort items in the repo list case sensitively. Default value: "1".
        See also: repository-sort, section-sort.
</p>
</dd>
<dt class="hdlist1">
cache-size
</dt>
<dd>
<p>
        The maximum number of entries in the cgit cache. When set to "0",
        caching is disabled. See also: "CACHE". Default value: "0"
</p>
</dd>
<dt class="hdlist1">
cache-snapshot-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of snapshots. See also: "CACHE". Default value: "5".
</p>
</dd>
<dt class="hdlist1">
cache-static-ttl
</dt>
<dd>
<p>
        Number which specifies the time-to-live, in minutes, for the cached
        version of repository pages accessed with a fixed SHA1. See also:
        "CACHE". Default value: -1".
</p>
</dd>
<dt class="hdlist1">
clone-prefix
</dt>
<dd>
<p>
        Space-separated list of common prefixes which, when combined with a
        repository url, generates valid clone urls for the repository. This
        setting is only used if <code>repo.clone-url</code> is unspecified. Default value:
        none.
</p>
</dd>
<dt class="hdlist1">
clone-url
</dt>
<dd>
<p>
        Space-separated list of clone-url templates. This setting is only
        used if <code>repo.clone-url</code> is unspecified. Default value: none. See
        also: "MACRO EXPANSION", "FILTER API".
</p>
</dd>
<dt class="hdlist1">
commit-filter
</dt>
<dd>
<p>
        Specifies a command which will be invoked to format commit messages.
        The command will get the message on its STDIN, and the STDOUT from the
        command will be included verbatim as the commit message, i.e. this can
        be used to implement bugtracker integration. Default value: none.
        See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
commit-sort
</dt>
<dd>
<p>
        Flag which, when set to "date", enables strict date ordering in the
        commit log, and when set to "topo" enables strict topological
        ordering. If unset, the default ordering of "git log" is used. Default
        value: unset.
</p>
</dd>
<dt class="hdlist1">
css
</dt>
<dd>
<p>
        Url which specifies the css document to include in all cgit pages.
        Default value: "/cgit.css".
</p>
</dd>
<dt class="hdlist1">
email-filter
</dt>
<dd>
<p>
        Specifies a command which will be invoked to format names and email
        address of committers, authors, and taggers, as represented in various
        places throughout the cgit interface. This command will receive an
        email address and an origin page string as its command line arguments,
        and the text to format on STDIN. It is to write the formatted text back
        out onto STDOUT. Default value: none. See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
embedded
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit generate a html fragment
        suitable for embedding in other html pages. Default value: none. See
        also: "noheader".
</p>
</dd>
<dt class="hdlist1">
enable-blame
</dt>
<dd>
<p>
        Flag which, when set to "1", will allow cgit to provide a "blame" page
        for files, and will make it generate links to that page in appropriate
        places. Default value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-commit-graph
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit print an ASCII-art commit
        history graph to the left of the commit messages in the repository
        log page. Default value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-filter-overrides
</dt>
<dd>
<p>
        Flag which, when set to "1", allows all filter settings to be
        overridden in repository-specific cgitrc files. Default value: none.
</p>
</dd>
<dt class="hdlist1">
enable-follow-links
</dt>
<dd>
<p>
        Flag which, when set to "1", allows users to follow a file in the log
        view.  Default value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-git-config
</dt>
<dd>
<p>
        Flag which, when set to "1", will allow cgit to use git config to set
        any repo specific settings. This option is used in conjunction with
        "scan-path", and must be defined prior, to augment repo-specific
        settings. The keys gitweb.owner, gitweb.category, gitweb.description,
        and gitweb.homepage will map to the cgit keys repo.owner, repo.section,
        repo.desc, and repo.homepage respectively. All git config keys that begin
        with "cgit." will be mapped to the corresponding "repo." key in cgit.
        Default value: "0". See also: scan-path, section-from-path.
</p>
</dd>
<dt class="hdlist1">
enable-http-clone
</dt>
<dd>
<p>
        If set to "1", cgit will act as a dumb HTTP endpoint for git clones.
        You can add "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL" to clone-url
        to expose this feature. If you use an alternate way of serving git
        repositories, you may wish to disable this. Default value: "1".
</p>
</dd>
<dt class="hdlist1">
enable-html-serving
</dt>
<dd>
<p>
        Flag which, when set to "1", will allow the /plain handler to serve
        mimetype headers that result in the file being treated as HTML by the
        browser. When set to "0", such file types are returned instead as
        text/plain or application/octet-stream. Default value: "0". See also:
        "repo.enable-html-serving".
</p>
</dd>
<dt class="hdlist1">
enable-index-links
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit generate extra links for
        each repo in the repository index (specifically, to the "summary",
        "commit" and "tree" pages). Default value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-index-owner
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit display the owner of
        each repo in the repository index. Default value: "1".
</p>
</dd>
<dt class="hdlist1">
enable-log-filecount
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit print the number of
        modified files for each commit on the repository log page. Default
        value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-log-linecount
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit print the number of added
        and removed lines for each commit on the repository log page. Default
        value: "0".
</p>
</dd>
<dt class="hdlist1">
enable-remote-branches
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit display remote branches
        in the summary and refs views. Default value: "0". See also:
        "repo.enable-remote-branches".
</p>
</dd>
<dt class="hdlist1">
enable-subject-links
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit use the subject of the
        parent commit as link text when generating links to parent commits
        in commit view. Default value: "0". See also:
        "repo.enable-subject-links".
</p>
</dd>
<dt class="hdlist1">
enable-tree-linenumbers
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit generate linenumber links
        for plaintext blobs printed in the tree view. Default value: "1".
</p>
</dd>
<dt class="hdlist1">
favicon
</dt>
<dd>
<p>
        Url used as link to a shortcut icon for cgit. It is suggested to use
        the value "/favicon.ico" since certain browsers will ignore other
        values. Default value: "/favicon.ico".
</p>
</dd>
<dt class="hdlist1">
footer
</dt>
<dd>
<p>
        The content of the file specified with this option will be included
        verbatim at the bottom of all pages (i.e. it replaces the standard
        "generated by&#8230;" message. Default value: none.
</p>
</dd>
<dt class="hdlist1">
head-include
</dt>
<dd>
<p>
        The content of the file specified with this option will be included
        verbatim in the html HEAD section on all pages. Default value: none.
</p>
</dd>
<dt class="hdlist1">
header
</dt>
<dd>
<p>
        The content of the file specified with this option will be included
        verbatim at the top of all pages. Default value: none.
</p>
</dd>
<dt class="hdlist1">
include
</dt>
<dd>
<p>
        Name of a configfile to include before the rest of the current config-
        file is parsed. Default value: none. See also: "MACRO EXPANSION".
</p>
</dd>
<dt class="hdlist1">
local-time
</dt>
<dd>
<p>
        Flag which, if set to "1", makes cgit print commit and tag times in the
        servers timezone. Default value: "0".
</p>
</dd>
<dt class="hdlist1">
logo
</dt>
<dd>
<p>
        Url which specifies the source of an image which will be used as a logo
        on all cgit pages. Default value: "/cgit.png".
</p>
</dd>
<dt class="hdlist1">
logo-link
</dt>
<dd>
<p>
        Url loaded when clicking on the cgit logo image. If unspecified the
        calculated url of the repository index page will be used. Default
        value: none.
</p>
</dd>
<dt class="hdlist1">
max-atom-items
</dt>
<dd>
<p>
        Specifies the number of items to display in atom feeds view. Default
        value: "10".
</p>
</dd>
<dt class="hdlist1">
max-blob-size
</dt>
<dd>
<p>
        Specifies the maximum size of a blob to display HTML for in KBytes.
        Default value: "0" (limit disabled).
</p>
</dd>
<dt class="hdlist1">
max-commit-count
</dt>
<dd>
<p>
        Specifies the number of entries to list per page in "log" view. Default
        value: "50".
</p>
</dd>
<dt class="hdlist1">
max-message-length
</dt>
<dd>
<p>
        Specifies the maximum number of commit message characters to display in
        "log" view. Default value: "80".
</p>
</dd>
<dt class="hdlist1">
max-repo-count
</dt>
<dd>
<p>
        Specifies the number of entries to list per page on the repository
        index page. Default value: "50".
</p>
</dd>
<dt class="hdlist1">
max-repodesc-length
</dt>
<dd>
<p>
        Specifies the maximum number of repo description characters to display
        on the repository index page. Default value: "80".
</p>
</dd>
<dt class="hdlist1">
max-stats
</dt>
<dd>
<p>
        Set the default maximum statistics period. Valid values are "week",
        "month", "quarter" and "year". If unspecified, statistics are
        disabled. Default value: none. See also: "repo.max-stats".
</p>
</dd>
<dt class="hdlist1">
mimetype.&lt;ext&gt;
</dt>
<dd>
<p>
        Set the mimetype for the specified filename extension. This is used
        by the <code>plain</code> command when returning blob content.
</p>
</dd>
<dt class="hdlist1">
mimetype-file
</dt>
<dd>
<p>
        Specifies the file to use for automatic mimetype lookup. If specified
        then this field is used as a fallback when no "mimetype.&lt;ext&gt;" match is
        found. If unspecified then no such lookup is performed. The typical file
        to use on a Linux system is /etc/mime.types. The format of the file must
        comply to:
</p>
<div class="ulist"><ul>
<li>
<p>
a comment line is an empty line or a line starting with a hash (#),
          optionally preceded by whitespace
</p>
</li>
<li>
<p>
a non-comment line starts with the mimetype (like image/png), followed
          by one or more file extensions (like jpg), all separated by whitespace
        Default value: none. See also: "mimetype.&lt;ext&gt;".
</p>
</li>
</ul></div>
</dd>
<dt class="hdlist1">
module-link
</dt>
<dd>
<p>
        Text which will be used as the formatstring for a hyperlink when a
        submodule is printed in a directory listing. The arguments for the
        formatstring are the path and SHA1 of the submodule commit. Default
        value: none.
</p>
</dd>
<dt class="hdlist1">
noplainemail
</dt>
<dd>
<p>
        If set to "1" showing full author email addresses will be disabled.
        Default value: "0".
</p>
</dd>
<dt class="hdlist1">
noheader
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit omit the standard header
        on all pages. Default value: none. See also: "embedded".
</p>
</dd>
<dt class="hdlist1">
owner-filter
</dt>
<dd>
<p>
        Specifies a command which will be invoked to format the Owner
        column of the main page.  The command will get the owner on STDIN,
        and the STDOUT from the command will be included verbatim in the
        table.  This can be used to link to additional context such as an
        owners home page.  When active this filter is used instead of the
        default owner query url.  Default value: none.
        See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
project-list
</dt>
<dd>
<p>
        A list of subdirectories inside of scan-path, relative to it, that
        should loaded as git repositories. This must be defined prior to
        scan-path. Default value: none. See also: scan-path, "MACRO
        EXPANSION".
</p>
</dd>
<dt class="hdlist1">
readme
</dt>
<dd>
<p>
        Text which will be used as default value for "repo.readme". Multiple
        config keys may be specified, and cgit will use the first found file
        in this list. This is useful in conjunction with scan-path. Default
        value: none. See also: scan-path, repo.readme.
</p>
</dd>
<dt class="hdlist1">
remove-suffix
</dt>
<dd>
<p>
        If set to "1" and scan-path is enabled, if any repositories are found
        with a suffix of ".git", this suffix will be removed for the url and
        name. This must be defined prior to scan-path. Default value: "0".
        See also: scan-path.
</p>
</dd>
<dt class="hdlist1">
renamelimit
</dt>
<dd>
<p>
        Maximum number of files to consider when detecting renames. The value
         "-1" uses the compiletime value in git (for further info, look at
          <code>man git-diff</code>). Default value: "-1".
</p>
</dd>
<dt class="hdlist1">
repository-sort
</dt>
<dd>
<p>
        The way in which repositories in each section are sorted. Valid values
        are "name" for sorting by the repo name or "age" for sorting by the
        most recently updated repository. Default value: "name". See also:
        section, case-sensitive-sort, section-sort.
</p>
</dd>
<dt class="hdlist1">
robots
</dt>
<dd>
<p>
        Text used as content for the "robots" meta-tag. Default value:
        "index, nofollow".
</p>
</dd>
<dt class="hdlist1">
root-desc
</dt>
<dd>
<p>
        Text printed below the heading on the repository index page. Default
        value: "a fast webinterface for the git dscm".
</p>
</dd>
<dt class="hdlist1">
root-readme
</dt>
<dd>
<p>
        The content of the file specified with this option will be included
        verbatim below the "about" link on the repository index page. Default
        value: none.
</p>
</dd>
<dt class="hdlist1">
root-title
</dt>
<dd>
<p>
        Text printed as heading on the repository index page. Default value:
        "Git Repository Browser".
</p>
</dd>
<dt class="hdlist1">
scan-hidden-path
</dt>
<dd>
<p>
        If set to "1" and scan-path is enabled, scan-path will recurse into
        directories whose name starts with a period (<em>.</em>). Otherwise,
        scan-path will stay away from such directories (considered as
        "hidden"). Note that this does not apply to the ".git" directory in
        non-bare repos. This must be defined prior to scan-path.
        Default value: 0. See also: scan-path.
</p>
</dd>
<dt class="hdlist1">
scan-path
</dt>
<dd>
<p>
        A path which will be scanned for repositories. If caching is enabled,
        the result will be cached as a cgitrc include-file in the cache
        directory. If project-list has been defined prior to scan-path,
        scan-path loads only the directories listed in the file pointed to by
        project-list. Be advised that only the global settings taken
        before the scan-path directive will be applied to each repository.
        Default value: none. See also: cache-scanrc-ttl, project-list,
        "MACRO EXPANSION".
</p>
</dd>
<dt class="hdlist1">
section
</dt>
<dd>
<p>
        The name of the current repository section - all repositories defined
        after this option will inherit the current section name. Default value:
        none.
</p>
</dd>
<dt class="hdlist1">
section-sort
</dt>
<dd>
<p>
        Flag which, when set to "1", will sort the sections on the repository
        listing by name. Set this flag to "0" if the order in the cgitrc file should
        be preserved. Default value: "1". See also: section,
        case-sensitive-sort, repository-sort.
</p>
</dd>
<dt class="hdlist1">
section-from-path
</dt>
<dd>
<p>
        A number which, if defined prior to scan-path, specifies how many
        path elements from each repo path to use as a default section name.
        If negative, cgit will discard the specified number of path elements
        above the repo directory. Default value: "0".
</p>
</dd>
<dt class="hdlist1">
side-by-side-diffs
</dt>
<dd>
<p>
        If set to "1" shows side-by-side diffs instead of unidiffs per
        default. Default value: "0".
</p>
</dd>
<dt class="hdlist1">
snapshots
</dt>
<dd>
<p>
        Text which specifies the default set of snapshot formats that cgit
        generates links for. The value is a space-separated list of zero or
        more of the values "tar", "tar.gz", "tar.bz2", "tar.xz" and "zip".
        The special value "all" enables all snapshot formats.
        Default value: none.
</p>
</dd>
<dt class="hdlist1">
source-filter
</dt>
<dd>
<p>
        Specifies a command which will be invoked to format plaintext blobs
        in the tree view. The command will get the blob content on its STDIN
        and the name of the blob as its only command line argument. The STDOUT
        from the command will be included verbatim as the blob contents, i.e.
        this can be used to implement e.g. syntax highlighting. Default value:
        none. See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
summary-branches
</dt>
<dd>
<p>
        Specifies the number of branches to display in the repository "summary"
        view. Default value: "10".
</p>
</dd>
<dt class="hdlist1">
summary-log
</dt>
<dd>
<p>
        Specifies the number of log entries to display in the repository
        "summary" view. Default value: "10".
</p>
</dd>
<dt class="hdlist1">
summary-tags
</dt>
<dd>
<p>
        Specifies the number of tags to display in the repository "summary"
        view. Default value: "10".
</p>
</dd>
<dt class="hdlist1">
strict-export
</dt>
<dd>
<p>
        Filename which, if specified, needs to be present within the repository
        for cgit to allow access to that repository. This can be used to emulate
        gitweb&#8217;s EXPORT_OK and STRICT_EXPORT functionality and limit cgit&#8217;s
        repositories to match those exported by git-daemon. This option must
        be defined prior to scan-path.
</p>
</dd>
<dt class="hdlist1">
virtual-root
</dt>
<dd>
<p>
        Url which, if specified, will be used as root for all cgit links. It
        will also cause cgit to generate <em>virtual urls</em>, i.e. urls like
        <em>/cgit/tree/README</em> as opposed to <em>?r=cgit&amp;p=tree&amp;path=README</em>. Default
        value: none.
        NOTE: cgit has recently learned how to use PATH_INFO to achieve the
        same kind of virtual urls, so this option will probably be deprecated.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="_repository_settings">REPOSITORY SETTINGS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
repo.about-filter
</dt>
<dd>
<p>
        Override the default about-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
repo.branch-sort
</dt>
<dd>
<p>
        Flag which, when set to "age", enables date ordering in the branch ref
        list, and when set to "name" enables ordering by branch name. Default
        value: "name".
</p>
</dd>
<dt class="hdlist1">
repo.clone-url
</dt>
<dd>
<p>
        A list of space-separated urls which can be used to clone this repo.
        Default value: none. See also: "MACRO EXPANSION".
</p>
</dd>
<dt class="hdlist1">
repo.commit-filter
</dt>
<dd>
<p>
        Override the default commit-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
repo.commit-sort
</dt>
<dd>
<p>
        Flag which, when set to "date", enables strict date ordering in the
        commit log, and when set to "topo" enables strict topological
        ordering. If unset, the default ordering of "git log" is used. Default
        value: unset.
</p>
</dd>
<dt class="hdlist1">
repo.defbranch
</dt>
<dd>
<p>
        The name of the default branch for this repository. If no such branch
        exists in the repository, the first branch name (when sorted) is used
        as default instead. Default value: branch pointed to by HEAD, or
        "master" if there is no suitable HEAD.
</p>
</dd>
<dt class="hdlist1">
repo.desc
</dt>
<dd>
<p>
        The value to show as repository description. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.email-filter
</dt>
<dd>
<p>
        Override the default email-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
repo.enable-commit-graph
</dt>
<dd>
<p>
        A flag which can be used to disable the global setting
        &#8216;enable-commit-graph&#8217;. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.enable-html-serving
</dt>
<dd>
<p>
        A flag which can be used to override the global setting
        <code>enable-html-serving</code>. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.enable-log-filecount
</dt>
<dd>
<p>
        A flag which can be used to disable the global setting
        &#8216;enable-log-filecount&#8217;. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.enable-log-linecount
</dt>
<dd>
<p>
        A flag which can be used to disable the global setting
        &#8216;enable-log-linecount&#8217;. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.enable-remote-branches
</dt>
<dd>
<p>
        Flag which, when set to "1", will make cgit display remote branches
        in the summary and refs views. Default value: &lt;enable-remote-branches&gt;.
</p>
</dd>
<dt class="hdlist1">
repo.enable-subject-links
</dt>
<dd>
<p>
        A flag which can be used to override the global setting
        &#8216;enable-subject-links&#8217;. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.extra-head-content
</dt>
<dd>
<p>
        This value will be added verbatim to the head section of each page
        displayed for this repo. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.hide
</dt>
<dd>
<p>
        Flag which, when set to "1", hides the repository from the repository
        index. The repository can still be accessed by providing a direct path.
        Default value: "0". See also: "repo.ignore".
</p>
</dd>
<dt class="hdlist1">
repo.homepage
</dt>
<dd>
<p>
        The value to show as repository homepage. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.ignore
</dt>
<dd>
<p>
        Flag which, when set to "1", ignores the repository. The repository
        is not shown in the index and cannot be accessed by providing a direct
        path. Default value: "0". See also: "repo.hide".
</p>
</dd>
<dt class="hdlist1">
repo.logo
</dt>
<dd>
<p>
        Url which specifies the source of an image which will be used as a logo
        on this repo&#8217;s pages. Default value: global logo.
</p>
</dd>
<dt class="hdlist1">
repo.logo-link
</dt>
<dd>
<p>
        Url loaded when clicking on the cgit logo image. If unspecified the
        calculated url of the repository index page will be used. Default
        value: global logo-link.
</p>
</dd>
<dt class="hdlist1">
repo.module-link
</dt>
<dd>
<p>
        Text which will be used as the formatstring for a hyperlink when a
        submodule is printed in a directory listing. The arguments for the
        formatstring are the path and SHA1 of the submodule commit. Default
        value: &lt;module-link&gt;
</p>
</dd>
<dt class="hdlist1">
repo.module-link.&lt;path&gt;
</dt>
<dd>
<p>
        Text which will be used as the formatstring for a hyperlink when a
        submodule with the specified subdirectory path is printed in a
        directory listing. The only argument for the formatstring is the SHA1
        of the submodule commit. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.max-stats
</dt>
<dd>
<p>
        Override the default maximum statistics period. Valid values are equal
        to the values specified for the global "max-stats" setting. Default
        value: none.
</p>
</dd>
<dt class="hdlist1">
repo.name
</dt>
<dd>
<p>
        The value to show as repository name. Default value: &lt;repo.url&gt;.
</p>
</dd>
<dt class="hdlist1">
repo.owner
</dt>
<dd>
<p>
        A value used to identify the owner of the repository. Default value:
        none.
</p>
</dd>
<dt class="hdlist1">
repo.owner-filter
</dt>
<dd>
<p>
        Override the default owner-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
repo.path
</dt>
<dd>
<p>
        An absolute path to the repository directory. For non-bare repositories
        this is the .git-directory. Default value: none.
</p>
</dd>
<dt class="hdlist1">
repo.readme
</dt>
<dd>
<p>
        A path (relative to &lt;repo.path&gt;) which specifies a file to include
        verbatim as the "About" page for this repo. You may also specify a
        git refspec by head or by hash by prepending the refspec followed by
        a colon. For example, "master:docs/readme.mkd". If the value begins
        with a colon, i.e. ":docs/readme.rst", the default branch of the
        repository will be used. Sharing any file will expose that entire
        directory tree to the "/about/PATH" endpoints, so be sure that there
        are no non-public files located in the same directory as the readme
        file. Default value: &lt;readme&gt;.
</p>
</dd>
<dt class="hdlist1">
repo.section
</dt>
<dd>
<p>
        Override the current section name for this repository. Default value:
        none.
</p>
</dd>
<dt class="hdlist1">
repo.snapshots
</dt>
<dd>
<p>
        A mask of snapshot formats for this repo that cgit generates links for,
        restricted by the global "snapshots" setting. Default value:
        &lt;snapshots&gt;.
</p>
</dd>
<dt class="hdlist1">
repo.snapshot-prefix
</dt>
<dd>
<p>
        Prefix to use for snapshot links instead of the repository basename.
        For example, the "linux-stable" repository may wish to set this to
        "linux" so that snapshots are in the format "linux-3.15.4" instead
        of "linux-stable-3.15.4".  Default value: &lt;empty&gt; meaning to use
        the repository basename.
</p>
</dd>
<dt class="hdlist1">
repo.source-filter
</dt>
<dd>
<p>
        Override the default source-filter. Default value: none. See also:
        "enable-filter-overrides". See also: "FILTER API".
</p>
</dd>
<dt class="hdlist1">
repo.url
</dt>
<dd>
<p>
        The relative url used to access the repository. This must be the first
        setting specified for each repo. Default value: none.
</p>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="_repository_specific_cgitrc_file">REPOSITORY-SPECIFIC CGITRC FILE</h2>
<div class="sectionbody">
<div class="paragraph"><p>When the option "scan-path" is used to auto-discover git repositories, cgit
will try to parse the file "cgitrc" within any found repository. Such a
repo-specific config file may contain any of the repo-specific options
described above, except "repo.url" and "repo.path". Additionally, the "filter"
options are only acknowledged in repo-specific config files when
"enable-filter-overrides" is set to "1".</p></div>
<div class="paragraph"><p>Note: the "repo." prefix is dropped from the option names in repo-specific
config files, e.g. "repo.desc" becomes "desc".</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_filter_api">FILTER API</h2>
<div class="sectionbody">
<div class="paragraph"><p>By default, filters are separate processes that are executed each time they
are needed.  Alternative technologies may be used by prefixing the filter
specification with the relevant string; available values are:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<em>exec:</em>
</dt>
<dd>
<p>
        The default "one process per filter" mode.
</p>
</dd>
<dt class="hdlist1">
<em>lua:</em>
</dt>
<dd>
<p>
        Executes the script using a built-in Lua interpreter. The script is
        loaded once per execution of cgit, and may be called multiple times
        during cgit&#8217;s lifetime, making it a good choice for repeated filters
        such as the <em>email filter</em>. It responds to three functions:
</p>
</dd>
<dt class="hdlist1">
<em>filter_open(argument1, argument2, argument3, &#8230;)</em>
</dt>
<dd>
<p>
                This is called upon activation of the filter for a particular
                set of data.
</p>
</dd>
<dt class="hdlist1">
<em>filter_write(buffer)</em>
</dt>
<dd>
<p>
                This is called whenever cgit writes data to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>filter_close()</em>
</dt>
<dd>
<p>
                This is called when the current filtering operation is
                completed. It must return an integer value. Usually 0
                indicates success.
</p>
<div class="literalblock">
<div class="content">
<pre><code>Additionally, cgit exposes to the Lua the following built-in functions:</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<em>html(str)</em>
</dt>
<dd>
<p>
                Writes <em>str</em> to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>html_txt(str)</em>
</dt>
<dd>
<p>
                HTML escapes and writes <em>str</em> to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>html_attr(str)</em>
</dt>
<dd>
<p>
                HTML escapes for an attribute and writes "str' to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>html_url_path(str)</em>
</dt>
<dd>
<p>
                URL escapes for a path and writes <em>str</em> to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>html_url_arg(str)</em>
</dt>
<dd>
<p>
                URL escapes for an argument and writes <em>str</em> to the webpage.
</p>
</dd>
<dt class="hdlist1">
<em>html_include(file)</em>
</dt>
<dd>
<p>
                Includes <em>file</em> in webpage.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>Parameters are provided to filters as follows.</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
about filter
</dt>
<dd>
<p>
        This filter is given a single parameter: the filename of the source
        file to filter. The filter can use the filename to determine (for
        example) the type of syntax to follow when formatting the readme file.
        The about text that is to be filtered is available on standard input
        and the filtered text is expected on standard output.
</p>
</dd>
<dt class="hdlist1">
auth filter
</dt>
<dd>
<p>
        The authentication filter receives 12 parameters:
</p>
<div class="ulist"><ul>
<li>
<p>
filter action, explained below, which specifies which action the
            filter is called for
</p>
</li>
<li>
<p>
http cookie
</p>
</li>
<li>
<p>
http method
</p>
</li>
<li>
<p>
http referer
</p>
</li>
<li>
<p>
http path
</p>
</li>
<li>
<p>
http https flag
</p>
</li>
<li>
<p>
cgit repo
</p>
</li>
<li>
<p>
cgit page
</p>
</li>
<li>
<p>
cgit url
</p>
</li>
<li>
<p>
cgit login url
        When the filter action is "body", this filter must write to output the
        HTML for displaying the login form, which POSTs to the login url. When
        the filter action is "authenticate-cookie", this filter must validate
        the http cookie and return a 0 if it is invalid or 1 if it is invalid,
        in the exit code / close function. If the filter action is
        "authenticate-post", this filter receives POST&#8217;d parameters on
        standard input, and should write a complete CGI response, preferably
        with a 302 redirect, and write to output one or more "Set-Cookie"
        HTTP headers, each followed by a newline.
</p>
<div class="literalblock">
<div class="content">
<pre><code>Please see `filters/simple-authentication.lua` for a clear example
script that may be modified.</code></pre>
</div></div>
</li>
</ul></div>
</dd>
<dt class="hdlist1">
commit filter
</dt>
<dd>
<p>
        This filter is given no arguments. The commit message text that is to
        be filtered is available on standard input and the filtered text is
        expected on standard output.
</p>
</dd>
<dt class="hdlist1">
email filter
</dt>
<dd>
<p>
        This filter is given two parameters: the email address of the relevant
        author and a string indicating the originating page. The filter will
        then receive the text string to format on standard input and is
        expected to write to standard output the formatted text to be included
        in the page.
</p>
</dd>
<dt class="hdlist1">
owner filter
</dt>
<dd>
<p>
        This filter is given no arguments.  The owner text is available on
        standard input and the filter is expected to write to standard
        output.  The output is included in the Owner column.
</p>
</dd>
<dt class="hdlist1">
source filter
</dt>
<dd>
<p>
        This filter is given a single parameter: the filename of the source
        file to filter. The filter can use the filename to determine (for
        example) the syntax highlighting mode. The contents of the source
        file that is to be filtered is available on standard input and the
        filtered contents is expected on standard output.
</p>
</dd>
</dl></div>
<div class="paragraph"><p>All filters are handed the following environment variables:</p></div>
<div class="ulist"><ul>
<li>
<p>
CGIT_REPO_URL (from repo.url)
</p>
</li>
<li>
<p>
CGIT_REPO_NAME (from repo.name)
</p>
</li>
<li>
<p>
CGIT_REPO_PATH (from repo.path)
</p>
</li>
<li>
<p>
CGIT_REPO_OWNER (from repo.owner)
</p>
</li>
<li>
<p>
CGIT_REPO_DEFBRANCH (from repo.defbranch)
</p>
</li>
<li>
<p>
CGIT_REPO_SECTION (from repo.section)
</p>
</li>
<li>
<p>
CGIT_REPO_CLONE_URL (from repo.clone-url)
</p>
</li>
</ul></div>
<div class="paragraph"><p>If a setting is not defined for a repository and the corresponding global
setting is also not defined (if applicable), then the corresponding
environment variable will be unset.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_macro_expansion">MACRO EXPANSION</h2>
<div class="sectionbody">
<div class="paragraph"><p>The following cgitrc options support a simple macro expansion feature,
where tokens prefixed with "$" are replaced with the value of a similarly
named environment variable:</p></div>
<div class="ulist"><ul>
<li>
<p>
cache-root
</p>
</li>
<li>
<p>
include
</p>
</li>
<li>
<p>
project-list
</p>
</li>
<li>
<p>
scan-path
</p>
</li>
</ul></div>
<div class="paragraph"><p>Macro expansion will also happen on the content of $CGIT_CONFIG, if
defined.</p></div>
<div class="paragraph"><p>One usage of this feature is virtual hosting, which in its simplest form
can be accomplished by adding the following line to /etc/cgitrc:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>include=/etc/cgitrc.d/$HTTP_HOST</code></pre>
</div></div>
<div class="paragraph"><p>The following options are expanded during request processing, and support
the environment variables defined in "FILTER API":</p></div>
<div class="ulist"><ul>
<li>
<p>
clone-url
</p>
</li>
<li>
<p>
repo.clone-url
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_cache">CACHE</h2>
<div class="sectionbody">
<div class="paragraph"><p>All cache ttl values are in minutes. Negative ttl values indicate that a page
type will never expire, and thus the first time a URL is accessed, the result
will be cached indefinitely, even if the underlying git repository changes.
Conversely, when a ttl value is zero, the cache is disabled for that
particular page type, and the page type is never cached.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_signatures">SIGNATURES</h2>
<div class="sectionbody">
<div class="paragraph"><p>Cgit can host .asc signatures corresponding to various snapshot formats,
through use of git notes. For example, the following command may be used to
add a signature to a .tar.xz archive:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>git notes --ref=refs/notes/signatures/tar.xz add -C "$(
    gpg --output - --armor --detach-sign cgit-1.1.tar.xz |
    git hash-object -w --stdin
)" v1.1</code></pre>
</div></div>
<div class="paragraph"><p>If it is instead desirable to attach a signature of the underlying .tar, this
will be linked, as a special case, beside a .tar.* link that does not have its
own signature. For example, a signature of a tarball of the latest tag might
be added with a similar command:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>tag="$(git describe --abbrev=0)"
git notes --ref=refs/notes/signatures/tar add -C "$(
    git archive --format tar --prefix "cgit-${tag#v}/" "$tag" |
    gpg --output - --armor --detach-sign |
    git hash-object -w --stdin
)" "$tag"</code></pre>
</div></div>
<div class="paragraph"><p>Since git-archive(1) is expected to produce stable output between versions,
this allows one to generate a long-term signature of the contents of a given
tag.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_example_cgitrc_file">EXAMPLE CGITRC FILE</h2>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
<pre><code># Enable caching of up to 1000 output entries
cache-size=1000


# Specify some default clone urls using macro expansion
clone-url=git://foo.org/$CGIT_REPO_URL git@foo.org:$CGIT_REPO_URL

# Specify the css url
css=/css/cgit.css


# Show owner on index page
enable-index-owner=1


# Allow http transport git clone
enable-http-clone=1


# Show extra links for each repository on the index page
enable-index-links=1


# Enable blame page and create links to it from tree page
enable-blame=1


# Enable ASCII art commit history graph on the log pages
enable-commit-graph=1


# Show number of affected files per commit on the log pages
enable-log-filecount=1


# Show number of added/removed lines per commit on the log pages
enable-log-linecount=1


# Sort branches by date
branch-sort=age


# Add a cgit favicon
favicon=/favicon.ico


# Use a custom logo
logo=/img/mylogo.png


# Enable statistics per week, month and quarter
max-stats=quarter


# Set the title and heading of the repository index page
root-title=example.com git repositories


# Set a subheading for the repository index page
root-desc=tracking the foobar development


# Include some more info about example.com on the index page
root-readme=/var/www/htdocs/about.html


# Allow download of tar.gz, tar.bz2 and zip-files
snapshots=tar.gz tar.bz2 zip


##
## List of common mimetypes
##

mimetype.gif=image/gif
mimetype.html=text/html
mimetype.jpg=image/jpeg
mimetype.jpeg=image/jpeg
mimetype.pdf=application/pdf
mimetype.png=image/png
mimetype.svg=image/svg+xml


# Highlight source code with python pygments-based highlighter
source-filter=/var/www/cgit/filters/syntax-highlighting.py

# Format markdown, restructuredtext, manpages, text files, and html files
# through the right converters
about-filter=/var/www/cgit/filters/about-formatting.sh

##
## Search for these files in the root of the default branch of repositories
## for coming up with the about page:
##
readme=:README.md
readme=:readme.md
readme=:README.mkd
readme=:readme.mkd
readme=:README.rst
readme=:readme.rst
readme=:README.html
readme=:readme.html
readme=:README.htm
readme=:readme.htm
readme=:README.txt
readme=:readme.txt
readme=:README
readme=:readme
readme=:INSTALL.md
readme=:install.md
readme=:INSTALL.mkd
readme=:install.mkd
readme=:INSTALL.rst
readme=:install.rst
readme=:INSTALL.html
readme=:install.html
readme=:INSTALL.htm
readme=:install.htm
readme=:INSTALL.txt
readme=:install.txt
readme=:INSTALL
readme=:install


##
## List of repositories.
## PS: Any repositories listed when section is unset will not be
##     displayed under a section heading
## PPS: This list could be kept in a different file (e.g. '/etc/cgitrepos')
##      and included like this:
##        include=/etc/cgitrepos
##


repo.url=foo
repo.path=/pub/git/foo.git
repo.desc=the master foo repository
repo.owner=fooman@example.com
repo.readme=info/web/about.html


repo.url=bar
repo.path=/pub/git/bar.git
repo.desc=the bars for your foo
repo.owner=barman@example.com
repo.readme=info/web/about.html


# The next repositories will be displayed under the 'extras' heading
section=extras


repo.url=baz
repo.path=/pub/git/baz.git
repo.desc=a set of extensions for bar users

repo.url=wiz
repo.path=/pub/git/wiz.git
repo.desc=the wizard of foo


# Add some mirrored repositories
section=mirrors


repo.url=git
repo.path=/pub/git/git.git
repo.desc=the dscm


repo.url=linux
repo.path=/pub/git/linux.git
repo.desc=the kernel

# Disable adhoc downloads of this repo
repo.snapshots=0

# Disable line-counts for this repo
repo.enable-log-linecount=0

# Restrict the max statistics period for this repo
repo.max-stats=month</code></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_bugs">BUGS</h2>
<div class="sectionbody">
<div class="paragraph"><p>Comments currently cannot appear on the same line as a setting; the comment
will be included as part of the value. E.g. this line:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>robots=index  # allow indexing</code></pre>
</div></div>
<div class="paragraph"><p>will generate the following html element:</p></div>
<div class="literalblock">
<div class="content">
<pre><code>&lt;meta name='robots' content='index  # allow indexing'/&gt;</code></pre>
</div></div>
</div>
</div>
<div class="sect1">
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
<div class="paragraph"><p>Lars Hjemli &lt;<a href="mailto:hjemli@gmail.com">hjemli@gmail.com</a>&gt;
Jason A. Donenfeld &lt;<a href="mailto:Jason@zx2c4.com">Jason@zx2c4.com</a>&gt;</p></div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated 2018-08-03 15:04:03 UTC
</div>
</div>
</body>
</html>