.\"
.TH "CGIT-UI.RC" 5 "2022-02-19" "cGit-ui CGI script" "cgit-ui.rc"
.SH "NAME"
\fB/etc/cgit-ui.rc\fR \- cGit-ui CGI script config file
.SH "DESCRIPTION"
\fB/etc/cgit-ui.rc\fR file describes Git repositories which should be shown by \fBcGit-ui\fR CGI script.
.SH "FILE FORMAT"
\fB/etc/cgit-ui.rc\fR is regular text file created by user to present Git repositories. This file reads by \fBcscmd\fR daemon
and converts to binary form for \fBcGit-ui\fR CGI script. Binary format allows to minimize the time needed for complete HTTP responses.
.PP
The configuration file consists of a set of variable or repository declarations also configuration file can contains section
of repository descriptions. The C/C++ comments are available:
.PP
.in +4n
.EX
\fI
/**************************
Kernel Git repositories:
*/
home-page = "https://www.kernel.org/";
repo 'git.git' {
owner = "Junio C. Hamano";
title = "The core git plumbing";
description = "Git – fast, scalable, distributed revision control system.";
git-root = '/pub/scm/git';
clone-prefix-readonly = 'git://git.kernel.org/pub/scm/git';
home-page = "https://git-scm.com/";
}
section "Other Repositories" {
repo 'other-repository' {
. . .
}
. . .
}
\fR
.EE
.in
.SH "DATA TYPES"
Configuration file assumes three types of variables.
.PP
\fBint\fR \- integer constants. Example declaration:
.PP
.in +4n
.EX
\fItrue = 1;\fR
.EE
.in
.PP
\fBstring\fR \- string constants. Example declaration:
.PP
.in +4n
.EX
\fIname = "Git-scm";\fR
.EE
.in
.PP
\fBpath\fR \- path constants. Example declaration:
.PP
.in +4n
.EX
\fIpath = '/etc/cgit-ui.rc';\fR
.EE
.in
.SH "RESERVED VARIABLES"
There is a set of variable names used by \fBcGit-ui\fR CGI Script.
.TP 4
\fBgit-root\fR
The name of directory where Git repositories is placed on the filesystem. For example:
.PP
.in +6n
.EX
\fIgit-root = '/pub/scm/git';\fR
.EE
.in
.TP 4
\fBrepo-root\fR
The name of directory where some repository is placed related to \fBgit-root\fR directory. For example:
.PP
.in +6n
.EX
\fIrepo-root = 'dm644x';\fR
.EE
.in
.TP 4
\fBclone-prefix-readonly\fR
The clone prefix for readonly access to the repository. The value of this variable should has \fBpath\fR type
without leadinfg dir-separator. Example declaration:
.PP
.in +6n
.EX
\fIclone-prefix-readonly = 'git://example.com';\fR
.EE
.in
.TP 4
\fBclone-prefix\fR
The clone prefix for readwrite access to the repository. The value of this variable should has \fBpath\fR type
without leadinfg dir-separator. Example declaration:
.PP
.in +6n
.EX
\fIclone-prefix = 'git://git@example.com:pub';\fR
.EE
.in
.RS 4
This means the access on behalf \fIgit\fR system user.
.RE
.TP 4
\fBtrunk\fR
The name of the main branch of particular repository. Default value is \fImaster\fR.
.RS 4
Example declarations of main branch name:
.RE
.PP
.in +6n
.EX
\fItrunk = 'master';\fR
.EE
.in
.TP 4
\fBsnapshots\fR
The extension of snapshot tarballs. Default value: \fI'tar.xz'\fR. Example declaration:
.PP
.in +6n
.EX
\fIsnapshots = 'tar.xz';\fR
.EE
.in
.RS 4
Currently snapshot variable is not used by \fBcGit-ui\fR CGI Script.
.RE
.TP 4
\fBcss\fR
.RS 4
The full name of the CSS style sheet relative to the directory where \fBcGit-ui\fR CGI Sctipt is installed.
Example declaration:
.RE
.PP
.in +6n
.EX
\fIcss = '/.cgit/css/cgit.css';\fR
.EE
.in
.TP 4
\fBlogo\fR
Url which specifies the source of an image which will be used as a logo (i.e right banner) on \fBcGit-ui\fR pages.
Default value: \fI'/.cgit/pixmaps/cgit-banner-280x280.png'\fR. The path to the \fBlogo\fR also should be set
relative to the directory where \fBcGit-ui\fR CGI Script is installed. Example declaration:
.PP
.in +6n
.EX
\fIlogo = '/.cgit/pixmaps/cgit-banner-280x280.png';\fR
.EE
.in
.TP 4
\fBlogo-alt\fR
The string used in HTML as a 'alt' property of the right banner tag. Default value: \fI"Example.org"\fR.
Example declaration:
.PP
.in +6n
.EX
\fIlogo-alt = "Example.org";\fR
.EE
.in
.TP 4
\fBlogo-link\fR
The string used in HTML as a 'href' property of the right banner image link tag. Default value: \fI"https://example.org"\fR.
Example declaration:
.PP
.in +6n
.EX
\fIlogo-link = "https://example.org";\fR
.EE
.in
.TP 4
\fBmain-menu-logo\fR
Url which specifies the source of an image which will be used as a logo of the main menu item on \fBcGit-ui\fR pages.
Default value: \fI'/.cgit/pixmaps/logo/git-logo-white-256x256.svg'\fR. The path to the \fBmain-menu-logo\fR also should be set
relative to the directory where \fBcGit-ui\fR CGI Script is installed. Example declaration:
.PP
.in +6n
.EX
\fImain-menu-logo = '/.cgit/pixmaps/logo/git-logo-white-256x256.svg';\fR
.EE
.in
.TP 4
\fBfavicon-path\fR
The directory name of the 'favicon.ico' file without leadind dir-separator.
Default value: \fI'/.cgit/pixmaps/favicon'\fR. Example declaration:
.PP
.in +6n
.EX
\fIfavicon-path = '/.cgit/pixmaps/favicon';\fR
.EE
.in
.RS 4
This directory name used for finding additional images declared in the HTML \fBheader\fR of all \fBcGit-ui\fR pages.
.RE
.TP 4
\fBsyntax-highlight-css\fR
The base name of the CSS style sheet file used for syntax highlighting.
Default value: \fI'_cgit.css'\fR. Example declaration:
.PP
.in +6n
.EX
\fIsyntax-highlight-css = '_cgit.css';\fR
.EE
.in
.RS 4
\fBcGit-ui\fR CGI Script uses highlight.js
.UR https://\:highlightjs.org\:/
.UE
installed into \fI'/.cgit/.engines/highlight/${hljs-version}/{css,js}'\fR directories
where the default \fI'_cgit.css'\fR file is palced too.
.RE
.TP 4
\fBheader\fR
The content of the file specified with this option will be included verbatim at the top of all pages.
Default value: \fI'/.cgit/html/header.html'\fR.
.TP 4
\fBfooter\fR
The content of the file specified with this option will be included verbatim at the bottom of all pages.
Default value: \fI'/.cgit/html/footer.html'\fR. Examle of the \fBheader\fR and the \fBfooter\fR declarations:
.PP
.in +6n
.EX
\fIheader = '/.cgit/html/header.html';\fR
\fIfooter = '/.cgit/html/footer.html';\fR
.EE
.in
.RS 4
The \fBheader\fR and the \fBfooter\fR files used as template where \fBcGit-ui\fR CGI Script substitute placeholders
such as \fI${variable-name}\fR by their values. For example the ${css} placeholder will be replaced by the value
of \fIcss\fR variable declared in the \fB/etc/cgit-ui.rc\fR config file.
.RE
.TP 4
\fBpage-size\fR
The \fBstring\fR or \fBint\fR variable which set the length of the repositories list or logs shown in one page by the \fBcGit-ui\fR CGI Script.
Default value: 200. Example declaration:
.PP
.in +6n
.EX
\fIpage-size = 50; /* 10 ... 200 may be string or integer. Default value is page-size = 200 */\fR
.EE
.in
.TP 4
\fBowner\fR
The \fBstring\fR variable used in the HTML header of all \fBcGit-ui\fR pages and also in the \fIOwner\fR colon of the repository list.
Default value: \fI"Andrey V.Kosteltsev"\fR.
.TP 4
\fBauthor\fR
The \fBstring\fR variable used in the HTML header of all \fBcGit-ui\fR pages. Default value: \fI"Andrey V.Kosteltsev"\fR.
Example declarations of the \fBowner\fR and the \fBauthor\fR variables:
.PP
.in +6n
.EX
\fIowner = "John Smith";\fR
\fIauthor = "John Smith";\fR
.EE
.in
.TP 4
\fBtitle\fR
The \fBstring\fR variable used in the HTML header of all \fBcGit-ui\fR pages as a page title. Default value: \fI"Git Repositories"\fR.
Example declaration:
.PP
.in +6n
.EX
\fItitle = "Example.org Git Repositories";\fR
.EE
.in
.TP 4
\fBdescription\fR
The \fBstring\fR variable used in the HTML header of all \fBcGit-ui\fR pages as a page description.
Default value: \fI"Git repositories hosted at Solar System, Earth"\fR.
Example declaration:
.PP
.in +6n
.EX
\fIdescription = "Git repositories hosted at example.org (St.-Petersburg)";\fR
.EE
.in
.RS 4
For a long description the value of this \fBstring\fR variable can be defined by following way:
.RE
.PP
.in +6n
.EX
\fIdescription = "Git repositories\fR
\fI hosted at example.org\fR
\fI (St.-Petersburg)";\fR
.EE
.in
.TP 4
\fBkeywords\fR
The \fBstring\fR variable contains space separated keywords used in the HTML header of all \fBcGit-ui\fR pages as a page keywords.
Default value: \fI"cGit repositories"\fR.
Example declaration:
.PP
.in +6n
.EX
\fIkeywords = "cGit UI CGI Git Repositories scm";\fR
.EE
.in
.TP 4
\fBcopyright-notice\fR
The \fBstring\fR variable used in the HTML footer of all \fBcGit-ui\fR pages as a Copyright Notice.
Default value: \fI"By using any website materials you agree to indicate source."\fR.
Example declaration:
.PP
.in +6n
.EX
\fIcopyright-notice = "By using any materials you agree with ...";\fR
.EE
.in
.TP 4
\fBcopyright\fR
The \fBstring\fR variable used in the HTML footer of all \fBcGit-ui\fR pages as a Copyright.
Default value: \fI"© 2022 Andrey V.Kosteltsev. All Rights Reserved."\fR.
Example declaration:
.PP
.in +6n
.EX
\fIcopyright = "© John Smith (explorer), 1580 - 1631.";\fR
.EE
.in
.TP 4
\fBhome-page\fR
The URL of the home page of the project.
Default value: \fI"https://example.org"\fR.
Example declaration:
.PP
.in +6n
.EX
\fIhome-page = "https://main-site-of-the-project.org";\fR
.EE
.in
Analytics variables:
.TP 4
\fBanalytic-links\fR
The path to the file which contains meta tags with site ownership verificaton codes for engines such as \fIGoogle Search Console\fR or
\fIYandex Webmaster\fR. \fBcGit-ui\fR CGI Script reads the file \fBanalytic-links\fR in RAW format and includes it into tag of each HTML page.
Example declaration:
.PP
.in +6n
.EX
\fIanalytic-links = '/analytics/links';\fR
.EE
.in
.RS 4
Where the file \fI/analytics/links\fR may contains HTML tags like follow:
.RE
.PP
.in +6n
.EX
\fI\fR
.EE
.in
.RS 4
The file name should be defined relative of the path where \fBcGit-ui\fR CGI Script is installed. For example, if \fBcGit-ui\fR CGI Script installed
into \fI/srv/www/htdocs/cgit\fR directory and file name declared as \fI/analytics/links\fR then \fBcGit-ui\fR CGI Script will try to read the
file \fI/srv/www/htdocs/cgit/analytics/links\fR.
.RE
.TP 4
\fBanalytic-scripts\fR
The path to the file which contains JavaScripts for engines such as \fIGoogle Search Console\fR or
\fIYandex Webmaster\fR. \fBcGit-ui\fR CGI Script reads the file \fBanalytic-scripts\fR in RAW format and includes it at the end of tag before
entry of each HTML page.
Example declaration:
.PP
.in +6n
.EX
\fIanalytic-scripts = '/analytics/scripts';\fR
.EE
.in
.RS 4
Where the file \fI/analytics/scripts\fR may contains code like follow:
.RE
.PP
.in +6n
.EX
\fI
\fR
.EE
.in
.RS 4
Please note that the \fI