05d292b2 (kx 2023-03-24 03:51:10 +0300 1)
05d292b2 (kx 2023-03-24 03:51:10 +0300 2) # [cgit-ui.rc(5) Config File](https://csvn.radix.pro/cgit-ui/trunk/doc/cgit-ui.rc.5.md)
05d292b2 (kx 2023-03-24 03:51:10 +0300 3)
05d292b2 (kx 2023-03-24 03:51:10 +0300 4) **/etc/cgit-ui.rc** – **cGit-ui CGI Script** config file describes the Git™
05d292b2 (kx 2023-03-24 03:51:10 +0300 5) repositories that should be displayed on the WEB-client side.
05d292b2 (kx 2023-03-24 03:51:10 +0300 6)
05d292b2 (kx 2023-03-24 03:51:10 +0300 7)
05d292b2 (kx 2023-03-24 03:51:10 +0300 8) ## Table of Contents
05d292b2 (kx 2023-03-24 03:51:10 +0300 9)
05d292b2 (kx 2023-03-24 03:51:10 +0300 10) * [File Format](#file-format)
05d292b2 (kx 2023-03-24 03:51:10 +0300 11) * [Data Types](#data-types)
05d292b2 (kx 2023-03-24 03:51:10 +0300 12) * [Reserved Variables](#reserved-variables)
05d292b2 (kx 2023-03-24 03:51:10 +0300 13) * [Repository Declaration](#repository-declaration)
05d292b2 (kx 2023-03-24 03:51:10 +0300 14) * [Working Example](#working-example)
05d292b2 (kx 2023-03-24 03:51:10 +0300 15) * [See Also](#see-also)
05d292b2 (kx 2023-03-24 03:51:10 +0300 16)
05d292b2 (kx 2023-03-24 03:51:10 +0300 17)
05d292b2 (kx 2023-03-24 03:51:10 +0300 18) ## File Format
05d292b2 (kx 2023-03-24 03:51:10 +0300 19)
05d292b2 (kx 2023-03-24 03:51:10 +0300 20) **/etc/cgit-ui.rc** is a regular text file created by user to present Git repositories. This file
05d292b2 (kx 2023-03-24 03:51:10 +0300 21) reads by [**cscmd(8)**](https://csvn.radix.pro/cscm/trunk/doc/cscmd.8.md) daemon and converts to binary
05d292b2 (kx 2023-03-24 03:51:10 +0300 22) form for **cGit-ui** CGI script. Binary format allows to minimize the time needed for complete HTTP
05d292b2 (kx 2023-03-24 03:51:10 +0300 23) responses.
05d292b2 (kx 2023-03-24 03:51:10 +0300 24)
05d292b2 (kx 2023-03-24 03:51:10 +0300 25) The configuration file consists of a set of variable or repository declarations also configuration
05d292b2 (kx 2023-03-24 03:51:10 +0300 26) file can contains section of repository descriptions. The C/C++ comments are available:
05d292b2 (kx 2023-03-24 03:51:10 +0300 27)
05d292b2 (kx 2023-03-24 03:51:10 +0300 28) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 29) /**************************
05d292b2 (kx 2023-03-24 03:51:10 +0300 30) Kernel Git repositories:
05d292b2 (kx 2023-03-24 03:51:10 +0300 31) */
05d292b2 (kx 2023-03-24 03:51:10 +0300 32) home-page = "https://www.kernel.org/";
05d292b2 (kx 2023-03-24 03:51:10 +0300 33)
05d292b2 (kx 2023-03-24 03:51:10 +0300 34) repo 'git.git' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 35) owner = "Junio C. Hamano";
05d292b2 (kx 2023-03-24 03:51:10 +0300 36) title = "The core git plumbing";
05d292b2 (kx 2023-03-24 03:51:10 +0300 37) description = "Git – fast, scalable, distributed revision control system.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 38) git-root = '/pub/scm/git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 39) clone-prefix-readonly = 'git://git.kernel.org/pub/scm/git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 40) home-page = "https://git-scm.com/";
05d292b2 (kx 2023-03-24 03:51:10 +0300 41) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 42)
05d292b2 (kx 2023-03-24 03:51:10 +0300 43) section "Other Repositories" {
05d292b2 (kx 2023-03-24 03:51:10 +0300 44) repo 'other-repository' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 45) . . .
05d292b2 (kx 2023-03-24 03:51:10 +0300 46) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 47) . . .
05d292b2 (kx 2023-03-24 03:51:10 +0300 48) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 49) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 50)
05d292b2 (kx 2023-03-24 03:51:10 +0300 51) ### Data Types
05d292b2 (kx 2023-03-24 03:51:10 +0300 52)
05d292b2 (kx 2023-03-24 03:51:10 +0300 53) Configuration file assumes three types of variables.
05d292b2 (kx 2023-03-24 03:51:10 +0300 54)
05d292b2 (kx 2023-03-24 03:51:10 +0300 55) > **int** – integer constants. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 56)
05d292b2 (kx 2023-03-24 03:51:10 +0300 57) >> ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 58) >> true = 1;
05d292b2 (kx 2023-03-24 03:51:10 +0300 59) >> ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 60)
05d292b2 (kx 2023-03-24 03:51:10 +0300 61)
05d292b2 (kx 2023-03-24 03:51:10 +0300 62) > **string** – string constants. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 63)
05d292b2 (kx 2023-03-24 03:51:10 +0300 64) >> ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 65) >> name = "Git-scm";
05d292b2 (kx 2023-03-24 03:51:10 +0300 66) >> ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 67)
05d292b2 (kx 2023-03-24 03:51:10 +0300 68)
05d292b2 (kx 2023-03-24 03:51:10 +0300 69) > **path** – path constants. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 70)
05d292b2 (kx 2023-03-24 03:51:10 +0300 71) >> ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 72) >> path = '/etc/cgit-ui.rc';
05d292b2 (kx 2023-03-24 03:51:10 +0300 73) >> ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 74)
05d292b2 (kx 2023-03-24 03:51:10 +0300 75)
05d292b2 (kx 2023-03-24 03:51:10 +0300 76) ### Reserved Variables
05d292b2 (kx 2023-03-24 03:51:10 +0300 77)
05d292b2 (kx 2023-03-24 03:51:10 +0300 78) There is a set of variable names used by **cGit-ui** CGI Script.
05d292b2 (kx 2023-03-24 03:51:10 +0300 79)
05d292b2 (kx 2023-03-24 03:51:10 +0300 80)
05d292b2 (kx 2023-03-24 03:51:10 +0300 81) #### git-root
05d292b2 (kx 2023-03-24 03:51:10 +0300 82)
05d292b2 (kx 2023-03-24 03:51:10 +0300 83) The name of directory where Git repositories is placed on the filesystem. For example:
05d292b2 (kx 2023-03-24 03:51:10 +0300 84)
05d292b2 (kx 2023-03-24 03:51:10 +0300 85) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 86) git-root = '/pub/scm/git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 87) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 88)
05d292b2 (kx 2023-03-24 03:51:10 +0300 89) #### repo-root
05d292b2 (kx 2023-03-24 03:51:10 +0300 90)
05d292b2 (kx 2023-03-24 03:51:10 +0300 91) The name of directory where some repository is placed related to **git-root** directory. For example:
05d292b2 (kx 2023-03-24 03:51:10 +0300 92)
05d292b2 (kx 2023-03-24 03:51:10 +0300 93) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 94) repo-root = 'dm644x';
05d292b2 (kx 2023-03-24 03:51:10 +0300 95) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 96)
05d292b2 (kx 2023-03-24 03:51:10 +0300 97)
05d292b2 (kx 2023-03-24 03:51:10 +0300 98) #### git-utc-offset
05d292b2 (kx 2023-03-24 03:51:10 +0300 99)
05d292b2 (kx 2023-03-24 03:51:10 +0300 100) The integer or string value of UTC offset on the Git server where repositories are published.
05d292b2 (kx 2023-03-24 03:51:10 +0300 101) For example:
05d292b2 (kx 2023-03-24 03:51:10 +0300 102)
05d292b2 (kx 2023-03-24 03:51:10 +0300 103) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 104) git-utc-offset = +0300; /* Europe/Moscow time zone */
05d292b2 (kx 2023-03-24 03:51:10 +0300 105) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 106)
05d292b2 (kx 2023-03-24 03:51:10 +0300 107)
05d292b2 (kx 2023-03-24 03:51:10 +0300 108) #### clone-prefix-readonly
05d292b2 (kx 2023-03-24 03:51:10 +0300 109)
05d292b2 (kx 2023-03-24 03:51:10 +0300 110) The clone prefix for readonly access to the repository. The value of this variable should
05d292b2 (kx 2023-03-24 03:51:10 +0300 111) has **path** type without leadinfg dir-separator. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 112)
05d292b2 (kx 2023-03-24 03:51:10 +0300 113) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 114) clone-prefix-readonly = 'git://example.com';
05d292b2 (kx 2023-03-24 03:51:10 +0300 115) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 116)
05d292b2 (kx 2023-03-24 03:51:10 +0300 117)
05d292b2 (kx 2023-03-24 03:51:10 +0300 118) #### clone-prefix
05d292b2 (kx 2023-03-24 03:51:10 +0300 119)
05d292b2 (kx 2023-03-24 03:51:10 +0300 120) The clone prefix for readwrite access to the repository. The value of this variable should
05d292b2 (kx 2023-03-24 03:51:10 +0300 121) has **path** type without leadinfg dir-separator. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 122)
05d292b2 (kx 2023-03-24 03:51:10 +0300 123) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 124) clone-prefix = 'git://git@example.com:pub';
05d292b2 (kx 2023-03-24 03:51:10 +0300 125) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 126)
05d292b2 (kx 2023-03-24 03:51:10 +0300 127) This means the access on behalf **git** system user.
05d292b2 (kx 2023-03-24 03:51:10 +0300 128)
05d292b2 (kx 2023-03-24 03:51:10 +0300 129)
05d292b2 (kx 2023-03-24 03:51:10 +0300 130) #### trunk
05d292b2 (kx 2023-03-24 03:51:10 +0300 131)
05d292b2 (kx 2023-03-24 03:51:10 +0300 132) The name of the main branch of particular repository. Default value is *'master'*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 133)
05d292b2 (kx 2023-03-24 03:51:10 +0300 134) Example declarations of main branch name:
05d292b2 (kx 2023-03-24 03:51:10 +0300 135)
05d292b2 (kx 2023-03-24 03:51:10 +0300 136) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 137) trunk = 'master';
05d292b2 (kx 2023-03-24 03:51:10 +0300 138) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 139)
05d292b2 (kx 2023-03-24 03:51:10 +0300 140)
05d292b2 (kx 2023-03-24 03:51:10 +0300 141) #### snapshots
05d292b2 (kx 2023-03-24 03:51:10 +0300 142)
05d292b2 (kx 2023-03-24 03:51:10 +0300 143) The extension of snapshot tarballs. Default value: *'tar.xz'*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 144)
05d292b2 (kx 2023-03-24 03:51:10 +0300 145) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 146) snapshots = 'tar.xz';
05d292b2 (kx 2023-03-24 03:51:10 +0300 147) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 148)
05d292b2 (kx 2023-03-24 03:51:10 +0300 149) Currently snapshot variable is not used by **cGit-ui** CGI Script.
05d292b2 (kx 2023-03-24 03:51:10 +0300 150)
05d292b2 (kx 2023-03-24 03:51:10 +0300 151)
05d292b2 (kx 2023-03-24 03:51:10 +0300 152) #### css
05d292b2 (kx 2023-03-24 03:51:10 +0300 153)
05d292b2 (kx 2023-03-24 03:51:10 +0300 154) The full name of the CSS style sheet relative to the directory where **cGit-ui** CGI Sctipt is installed.
05d292b2 (kx 2023-03-24 03:51:10 +0300 155) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 156)
05d292b2 (kx 2023-03-24 03:51:10 +0300 157) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 158) css = '/.cgit/css/cgit.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 159) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 160)
05d292b2 (kx 2023-03-24 03:51:10 +0300 161)
05d292b2 (kx 2023-03-24 03:51:10 +0300 162) #### logo
05d292b2 (kx 2023-03-24 03:51:10 +0300 163)
05d292b2 (kx 2023-03-24 03:51:10 +0300 164) Url which specifies the source of an image which will be used as a logo (i.e right banner)
05d292b2 (kx 2023-03-24 03:51:10 +0300 165) on **cGit-ui** pages. Default value: *'/.cgit/pixmaps/cgit-banner-280x280.png'*. The path to the
05d292b2 (kx 2023-03-24 03:51:10 +0300 166) **logo** also should be set relative to the directory where **cGit-ui** CGI Script is installed.
05d292b2 (kx 2023-03-24 03:51:10 +0300 167) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 168)
05d292b2 (kx 2023-03-24 03:51:10 +0300 169) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 170) logo = '/.cgit/pixmaps/cgit-banner-280x280.png';
05d292b2 (kx 2023-03-24 03:51:10 +0300 171) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 172)
05d292b2 (kx 2023-03-24 03:51:10 +0300 173)
05d292b2 (kx 2023-03-24 03:51:10 +0300 174) #### logo-alt
05d292b2 (kx 2023-03-24 03:51:10 +0300 175)
05d292b2 (kx 2023-03-24 03:51:10 +0300 176) The string used in HTML as a 'alt' property of the right banner <img> tag.
05d292b2 (kx 2023-03-24 03:51:10 +0300 177) Default value: *"Example.org"*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 178)
05d292b2 (kx 2023-03-24 03:51:10 +0300 179) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 180) logo-alt = "Example.org";
05d292b2 (kx 2023-03-24 03:51:10 +0300 181) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 182)
05d292b2 (kx 2023-03-24 03:51:10 +0300 183)
05d292b2 (kx 2023-03-24 03:51:10 +0300 184) #### logo-link
05d292b2 (kx 2023-03-24 03:51:10 +0300 185)
05d292b2 (kx 2023-03-24 03:51:10 +0300 186) The string used in HTML as a 'href' property of the right banner image link <a> tag.
05d292b2 (kx 2023-03-24 03:51:10 +0300 187) Default value: *"https://example.org"*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 188)
05d292b2 (kx 2023-03-24 03:51:10 +0300 189) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 190) logo-link = "https://example.org";
05d292b2 (kx 2023-03-24 03:51:10 +0300 191) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 192)
05d292b2 (kx 2023-03-24 03:51:10 +0300 193)
05d292b2 (kx 2023-03-24 03:51:10 +0300 194) #### main-menu-logo
05d292b2 (kx 2023-03-24 03:51:10 +0300 195)
05d292b2 (kx 2023-03-24 03:51:10 +0300 196) Url which specifies the source of an image which will be used as a logo of the main menu item
05d292b2 (kx 2023-03-24 03:51:10 +0300 197) on **cGit-ui** pages. Default value: *'/.cgit/pixmaps/logo/git-logo-white-256x256.svg'*. The path
05d292b2 (kx 2023-03-24 03:51:10 +0300 198) to the *main-menu-logo* also should be set relative to the directory where **cGit-ui** CGI Script
05d292b2 (kx 2023-03-24 03:51:10 +0300 199) is installed. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 200)
05d292b2 (kx 2023-03-24 03:51:10 +0300 201) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 202) main-menu-logo = '/.cgit/pixmaps/logo/git-logo-white-256x256.svg';
05d292b2 (kx 2023-03-24 03:51:10 +0300 203) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 204)
05d292b2 (kx 2023-03-24 03:51:10 +0300 205)
05d292b2 (kx 2023-03-24 03:51:10 +0300 206) #### favicon-path
05d292b2 (kx 2023-03-24 03:51:10 +0300 207)
05d292b2 (kx 2023-03-24 03:51:10 +0300 208) The directory name of the *favicon.ico* file without leadind dir-separator.
05d292b2 (kx 2023-03-24 03:51:10 +0300 209) Default value: *'/.cgit/pixmaps/favicon'*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 210)
05d292b2 (kx 2023-03-24 03:51:10 +0300 211) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 212) favicon-path = '/.cgit/pixmaps/favicon';
05d292b2 (kx 2023-03-24 03:51:10 +0300 213) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 214)
05d292b2 (kx 2023-03-24 03:51:10 +0300 215) This directory name used for finding additional images declared in the HTML **header** of all
05d292b2 (kx 2023-03-24 03:51:10 +0300 216) **cGit-ui** pages.
05d292b2 (kx 2023-03-24 03:51:10 +0300 217)
05d292b2 (kx 2023-03-24 03:51:10 +0300 218)
05d292b2 (kx 2023-03-24 03:51:10 +0300 219) #### syntax-highlight-css
05d292b2 (kx 2023-03-24 03:51:10 +0300 220)
05d292b2 (kx 2023-03-24 03:51:10 +0300 221) The base name of the CSS style sheet file used for syntax highlighting.
05d292b2 (kx 2023-03-24 03:51:10 +0300 222) Default value: *'_cgit.css'*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 223)
05d292b2 (kx 2023-03-24 03:51:10 +0300 224) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 225) syntax-highlight-css = '_cgit.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 226) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 227)
05d292b2 (kx 2023-03-24 03:51:10 +0300 228) **cGit-ui** CGI Script uses [highlight.js](https://highlightjs.org/) installed into
05d292b2 (kx 2023-03-24 03:51:10 +0300 229) `/.cgit/.engines/highlight/${hljs-version}/{css,js}` directories where the default
05d292b2 (kx 2023-03-24 03:51:10 +0300 230) *_cgit.css* file is palced too.
05d292b2 (kx 2023-03-24 03:51:10 +0300 231)
05d292b2 (kx 2023-03-24 03:51:10 +0300 232)
05d292b2 (kx 2023-03-24 03:51:10 +0300 233) #### header
05d292b2 (kx 2023-03-24 03:51:10 +0300 234)
05d292b2 (kx 2023-03-24 03:51:10 +0300 235) The content of the file specified with this option will be included verbatim at the top of all pages.
05d292b2 (kx 2023-03-24 03:51:10 +0300 236) Default value: *'/.cgit/html/header.html'*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 237)
05d292b2 (kx 2023-03-24 03:51:10 +0300 238) #### footer
05d292b2 (kx 2023-03-24 03:51:10 +0300 239)
05d292b2 (kx 2023-03-24 03:51:10 +0300 240) The content of the file specified with this option will be included verbatim at the bottom of all pages.
05d292b2 (kx 2023-03-24 03:51:10 +0300 241) Default value: *'/.cgit/html/footer.html'*. Examle of the **header** and the **footer** declarations:
05d292b2 (kx 2023-03-24 03:51:10 +0300 242)
05d292b2 (kx 2023-03-24 03:51:10 +0300 243) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 244) header = '/.cgit/html/header.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 245) footer = '/.cgit/html/footer.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 246) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 247)
05d292b2 (kx 2023-03-24 03:51:10 +0300 248) The **header** and the **footer** files used as template where **cGit-ui** CGI Script substitute
05d292b2 (kx 2023-03-24 03:51:10 +0300 249) placeholders such as `${variable-name}` by their values. For example the `${css}` placeholder
05d292b2 (kx 2023-03-24 03:51:10 +0300 250) will be replaced by the value of **css** variable declared in the **/etc/cgit-ui.rc** config file.
05d292b2 (kx 2023-03-24 03:51:10 +0300 251)
05d292b2 (kx 2023-03-24 03:51:10 +0300 252)
05d292b2 (kx 2023-03-24 03:51:10 +0300 253) #### page-size
05d292b2 (kx 2023-03-24 03:51:10 +0300 254)
05d292b2 (kx 2023-03-24 03:51:10 +0300 255) The **string** or **int** variable which set the length of the repositories list or logs that shown
05d292b2 (kx 2023-03-24 03:51:10 +0300 256) in one page by the **cGit-ui** CGI Script. Default value: 200. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 257)
05d292b2 (kx 2023-03-24 03:51:10 +0300 258) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 259) page-size = 50; /* 10 ... 200 may be string or integer. Default value is page-size = 200 */
05d292b2 (kx 2023-03-24 03:51:10 +0300 260) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 261)
05d292b2 (kx 2023-03-24 03:51:10 +0300 262) #### owner
05d292b2 (kx 2023-03-24 03:51:10 +0300 263)
05d292b2 (kx 2023-03-24 03:51:10 +0300 264) The **string** variable used in the HTML header of all **cGit-ui** pages and also in the *Owner* colon
05d292b2 (kx 2023-03-24 03:51:10 +0300 265) of the repository list. Default value: *"Andrey V.Kosteltsev"*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 266)
05d292b2 (kx 2023-03-24 03:51:10 +0300 267) #### author
05d292b2 (kx 2023-03-24 03:51:10 +0300 268)
05d292b2 (kx 2023-03-24 03:51:10 +0300 269) The **string** variable used in the HTML header of all **cGit-ui** pages. Default value: *"Andrey V.Kosteltsev"*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 270) Example declarations of the **owner** and the **author** variables:
05d292b2 (kx 2023-03-24 03:51:10 +0300 271)
05d292b2 (kx 2023-03-24 03:51:10 +0300 272) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 273) owner = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 274) author = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 275) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 276)
05d292b2 (kx 2023-03-24 03:51:10 +0300 277)
05d292b2 (kx 2023-03-24 03:51:10 +0300 278) #### title
05d292b2 (kx 2023-03-24 03:51:10 +0300 279)
05d292b2 (kx 2023-03-24 03:51:10 +0300 280) The **string** variable used in the HTML header of all **cGit-ui** pages as a page title.
05d292b2 (kx 2023-03-24 03:51:10 +0300 281) Default value: *"Git Repositories"*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 282)
05d292b2 (kx 2023-03-24 03:51:10 +0300 283) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 284) title = "Example.org Git Repositories";
05d292b2 (kx 2023-03-24 03:51:10 +0300 285) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 286)
05d292b2 (kx 2023-03-24 03:51:10 +0300 287)
05d292b2 (kx 2023-03-24 03:51:10 +0300 288) #### description
05d292b2 (kx 2023-03-24 03:51:10 +0300 289)
05d292b2 (kx 2023-03-24 03:51:10 +0300 290) The **string** variable used in the HTML header of all **cGit-ui** pages as a page description.
05d292b2 (kx 2023-03-24 03:51:10 +0300 291) Default value: *"Git repositories hosted at Solar System, Earth"*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 292) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 293)
05d292b2 (kx 2023-03-24 03:51:10 +0300 294) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 295) description = "Git repositories hosted at example.org (St.-Petersburg)";
05d292b2 (kx 2023-03-24 03:51:10 +0300 296) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 297)
05d292b2 (kx 2023-03-24 03:51:10 +0300 298) For a long description the value of this **string** variable can be defined by following way:
05d292b2 (kx 2023-03-24 03:51:10 +0300 299)
05d292b2 (kx 2023-03-24 03:51:10 +0300 300) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 301) description = "Git repositories
05d292b2 (kx 2023-03-24 03:51:10 +0300 302) hosted at example.org
05d292b2 (kx 2023-03-24 03:51:10 +0300 303) (St.-Petersburg)";
05d292b2 (kx 2023-03-24 03:51:10 +0300 304) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 305)
05d292b2 (kx 2023-03-24 03:51:10 +0300 306)
05d292b2 (kx 2023-03-24 03:51:10 +0300 307) #### keywords
05d292b2 (kx 2023-03-24 03:51:10 +0300 308)
05d292b2 (kx 2023-03-24 03:51:10 +0300 309) The **string** variable contains space separated keywords used in the HTML header of all **cGit-ui**
05d292b2 (kx 2023-03-24 03:51:10 +0300 310) pages as a page keywords. Default value: *"cGit repositories"*. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 311)
05d292b2 (kx 2023-03-24 03:51:10 +0300 312) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 313) keywords = "cGit UI CGI Git Repositories scm";
05d292b2 (kx 2023-03-24 03:51:10 +0300 314) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 315)
05d292b2 (kx 2023-03-24 03:51:10 +0300 316)
05d292b2 (kx 2023-03-24 03:51:10 +0300 317) #### copyright-notice
05d292b2 (kx 2023-03-24 03:51:10 +0300 318)
05d292b2 (kx 2023-03-24 03:51:10 +0300 319) The **string** variable used in the HTML footer of all **cGit-ui** pages as a *Copyright Notice*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 320) Default value: *"By using any website materials you agree to indicate source."*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 321) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 322)
05d292b2 (kx 2023-03-24 03:51:10 +0300 323) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 324) copyright-notice = "By using any materials you agree with ...";
05d292b2 (kx 2023-03-24 03:51:10 +0300 325) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 326)
05d292b2 (kx 2023-03-24 03:51:10 +0300 327)
05d292b2 (kx 2023-03-24 03:51:10 +0300 328) #### copyright
05d292b2 (kx 2023-03-24 03:51:10 +0300 329)
05d292b2 (kx 2023-03-24 03:51:10 +0300 330) The **string** variable used in the HTML footer of all **cGit-ui** pages as a *Copyright*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 331) Default value: *"© 2022 Andrey V.Kosteltsev. All Rights Reserved."*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 332) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 333)
05d292b2 (kx 2023-03-24 03:51:10 +0300 334) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 335) copyright = "© John Smith (explorer), 1580 - 1631.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 336) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 337)
05d292b2 (kx 2023-03-24 03:51:10 +0300 338)
05d292b2 (kx 2023-03-24 03:51:10 +0300 339) #### home-page
05d292b2 (kx 2023-03-24 03:51:10 +0300 340)
05d292b2 (kx 2023-03-24 03:51:10 +0300 341) The URL of the home page of the project. Default value: *"https://example.org"*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 342) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 343)
05d292b2 (kx 2023-03-24 03:51:10 +0300 344) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 345) home-page = "https://main-site-of-the-project.org";
05d292b2 (kx 2023-03-24 03:51:10 +0300 346) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 347)
05d292b2 (kx 2023-03-24 03:51:10 +0300 348)
05d292b2 (kx 2023-03-24 03:51:10 +0300 349) ### Analytics variables:
05d292b2 (kx 2023-03-24 03:51:10 +0300 350)
05d292b2 (kx 2023-03-24 03:51:10 +0300 351)
05d292b2 (kx 2023-03-24 03:51:10 +0300 352) #### analytic-links
05d292b2 (kx 2023-03-24 03:51:10 +0300 353)
05d292b2 (kx 2023-03-24 03:51:10 +0300 354) The path to the file which contains meta tags with site ownership verificaton codes for engines such as *Google Search Console* or
05d292b2 (kx 2023-03-24 03:51:10 +0300 355) *Yandex Webmaster*. **cGit-ui** CGI Script reads the file **analytic-links** in RAW format and includes it into <HEAD> tag of each HTML page.
05d292b2 (kx 2023-03-24 03:51:10 +0300 356) Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 357)
05d292b2 (kx 2023-03-24 03:51:10 +0300 358) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 359) analytic-links = '/analytics/links';
05d292b2 (kx 2023-03-24 03:51:10 +0300 360) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 361)
05d292b2 (kx 2023-03-24 03:51:10 +0300 362) Where the file */analytics/links* may contains HTML tags like follow:
05d292b2 (kx 2023-03-24 03:51:10 +0300 363)
05d292b2 (kx 2023-03-24 03:51:10 +0300 364) ```html
05d292b2 (kx 2023-03-24 03:51:10 +0300 365) <meta name="google-site-verification" content="..." />
05d292b2 (kx 2023-03-24 03:51:10 +0300 366) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 367)
05d292b2 (kx 2023-03-24 03:51:10 +0300 368) The file name should be defined relative of the path where **cGit-ui** CGI Script is installed. For example, if **cGit-ui** CGI Script installed
05d292b2 (kx 2023-03-24 03:51:10 +0300 369) into */srv/www/htdocs/cgit* directory and file name declared as */analytics/links* then **cGit-ui** CGI Script will try to read the
05d292b2 (kx 2023-03-24 03:51:10 +0300 370) file */srv/www/htdocs/cgit/analytics/links*.
05d292b2 (kx 2023-03-24 03:51:10 +0300 371)
05d292b2 (kx 2023-03-24 03:51:10 +0300 372)
05d292b2 (kx 2023-03-24 03:51:10 +0300 373) #### analytic-scripts
05d292b2 (kx 2023-03-24 03:51:10 +0300 374)
05d292b2 (kx 2023-03-24 03:51:10 +0300 375) The path to the file which contains *JavaScripts* for engines such as *Google Search Console* or
05d292b2 (kx 2023-03-24 03:51:10 +0300 376) *Yandex Webmaster*. **cGit-ui** CGI Script reads the file **analytic-scripts** in RAW format and includes it at the end of <HEAD> tag before
05d292b2 (kx 2023-03-24 03:51:10 +0300 377) </HEAD> entry of each HTML page. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 378)
05d292b2 (kx 2023-03-24 03:51:10 +0300 379) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 380) analytic-scripts = '/analytics/scripts';
05d292b2 (kx 2023-03-24 03:51:10 +0300 381) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 382)
05d292b2 (kx 2023-03-24 03:51:10 +0300 383) Where the file */analytics/scripts* may contains code like follow:
05d292b2 (kx 2023-03-24 03:51:10 +0300 384)
05d292b2 (kx 2023-03-24 03:51:10 +0300 385) ```html
05d292b2 (kx 2023-03-24 03:51:10 +0300 386) <!-- Global site tag (gtag.js) - Google Analytics -->
05d292b2 (kx 2023-03-24 03:51:10 +0300 387) <script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
05d292b2 (kx 2023-03-24 03:51:10 +0300 388) <script>
05d292b2 (kx 2023-03-24 03:51:10 +0300 389) window.dataLayer = window.dataLayer || [];
05d292b2 (kx 2023-03-24 03:51:10 +0300 390) function gtag(){dataLayer.push(arguments);}
05d292b2 (kx 2023-03-24 03:51:10 +0300 391) gtag('js', new Date());
05d292b2 (kx 2023-03-24 03:51:10 +0300 392)
05d292b2 (kx 2023-03-24 03:51:10 +0300 393) gtag('config', 'G-XXXXXXXXXX');
05d292b2 (kx 2023-03-24 03:51:10 +0300 394) </script>
05d292b2 (kx 2023-03-24 03:51:10 +0300 395) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 396)
05d292b2 (kx 2023-03-24 03:51:10 +0300 397) Please note that the *<script>* tags should be present in the */analytics/scripts* because **cGit-ui** CGI Script reads this file
05d292b2 (kx 2023-03-24 03:51:10 +0300 398) in RAW format and includes it as is.
05d292b2 (kx 2023-03-24 03:51:10 +0300 399)
05d292b2 (kx 2023-03-24 03:51:10 +0300 400) The variables **analytic-links** and **analytic-scripts** should be declared on the global level of the **/etc/cgit-ui.rc**
05d292b2 (kx 2023-03-24 03:51:10 +0300 401) configuration file and cannot be overriden in a repository declaration.
05d292b2 (kx 2023-03-24 03:51:10 +0300 402)
05d292b2 (kx 2023-03-24 03:51:10 +0300 403)
05d292b2 (kx 2023-03-24 03:51:10 +0300 404) ### Donation variables:
05d292b2 (kx 2023-03-24 03:51:10 +0300 405)
05d292b2 (kx 2023-03-24 03:51:10 +0300 406) The **cGit-ui** CGI Script provides the ability to create a custom donation dialogue. To do this, you need to create a set of three files:
05d292b2 (kx 2023-03-24 03:51:10 +0300 407) **CSS**, **HTML**, and **JavaScript** file for automation. You can add a donation dialogue for each repository separately, as well as for the
05d292b2 (kx 2023-03-24 03:51:10 +0300 408) entire list of repositories. To enable donation dialogue you have to set the value of **donate** variable to **donate = 1**:
05d292b2 (kx 2023-03-24 03:51:10 +0300 409)
05d292b2 (kx 2023-03-24 03:51:10 +0300 410)
05d292b2 (kx 2023-03-24 03:51:10 +0300 411) #### donate
05d292b2 (kx 2023-03-24 03:51:10 +0300 412)
05d292b2 (kx 2023-03-24 03:51:10 +0300 413) The integer variable used to enable or disable donation dialogue. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 414)
05d292b2 (kx 2023-03-24 03:51:10 +0300 415) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 416) donate = 1;
05d292b2 (kx 2023-03-24 03:51:10 +0300 417) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 418)
05d292b2 (kx 2023-03-24 03:51:10 +0300 419) #### donate-css
05d292b2 (kx 2023-03-24 03:51:10 +0300 420)
05d292b2 (kx 2023-03-24 03:51:10 +0300 421) The name of file contains the stylesheet for donation modal dialogue. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 422)
05d292b2 (kx 2023-03-24 03:51:10 +0300 423) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 424) donate-css = '/donations/donate.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 425) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 426)
05d292b2 (kx 2023-03-24 03:51:10 +0300 427) #### donate-html
05d292b2 (kx 2023-03-24 03:51:10 +0300 428)
05d292b2 (kx 2023-03-24 03:51:10 +0300 429) The name of file contains the HTML code of donation modal dialogue. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 430)
05d292b2 (kx 2023-03-24 03:51:10 +0300 431) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 432) donate-html = '/donations/donate.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 433) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 434)
05d292b2 (kx 2023-03-24 03:51:10 +0300 435) #### donate-js
05d292b2 (kx 2023-03-24 03:51:10 +0300 436)
05d292b2 (kx 2023-03-24 03:51:10 +0300 437) The name of file contains the javascript code for donation modal dialogue automation. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 438)
05d292b2 (kx 2023-03-24 03:51:10 +0300 439) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 440) donate-js = '/donations/donate.js';
05d292b2 (kx 2023-03-24 03:51:10 +0300 441) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 442)
05d292b2 (kx 2023-03-24 03:51:10 +0300 443) **cGit-ui** CGI Script includes these files at end of <BODY> tag just before the closing </BODY> tag. Unlike the others,
05d292b2 (kx 2023-03-24 03:51:10 +0300 444) the **donate-html** file should be no more than 8192 bytes in size due to the fact that this file is a template
05d292b2 (kx 2023-03-24 03:51:10 +0300 445) and the values of the following two variables are substituted into its body using placeholders *${donate-header}*
05d292b2 (kx 2023-03-24 03:51:10 +0300 446) and *${donate-purpose}*:
05d292b2 (kx 2023-03-24 03:51:10 +0300 447)
05d292b2 (kx 2023-03-24 03:51:10 +0300 448)
05d292b2 (kx 2023-03-24 03:51:10 +0300 449) #### donate-header
05d292b2 (kx 2023-03-24 03:51:10 +0300 450)
05d292b2 (kx 2023-03-24 03:51:10 +0300 451) The title of the donation modal dialogue defined in the **donate-html** file. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 452)
05d292b2 (kx 2023-03-24 03:51:10 +0300 453) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 454) donate-header = "Donations";
05d292b2 (kx 2023-03-24 03:51:10 +0300 455) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 456)
05d292b2 (kx 2023-03-24 03:51:10 +0300 457) #### donate-purpose
05d292b2 (kx 2023-03-24 03:51:10 +0300 458)
05d292b2 (kx 2023-03-24 03:51:10 +0300 459) The donation purpose used as value of <input value="..."> tag property in payment form of systems such as **PayPal** or **Yandex.Money**.
05d292b2 (kx 2023-03-24 03:51:10 +0300 460) Also this value can be used as a header of modal dialogue content. Example declaration:
05d292b2 (kx 2023-03-24 03:51:10 +0300 461)
05d292b2 (kx 2023-03-24 03:51:10 +0300 462) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 463) donate-purpose = "Support for our projects";
05d292b2 (kx 2023-03-24 03:51:10 +0300 464) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 465)
05d292b2 (kx 2023-03-24 03:51:10 +0300 466) Donation dialogue can be defined for each repository separately or defined on global level. In the last case
05d292b2 (kx 2023-03-24 03:51:10 +0300 467) the dialogue header and payment purpose may be overriden in the body of a repository declaration like follow:
05d292b2 (kx 2023-03-24 03:51:10 +0300 468)
05d292b2 (kx 2023-03-24 03:51:10 +0300 469) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 470) true = 1;
05d292b2 (kx 2023-03-24 03:51:10 +0300 471) false = 0;
05d292b2 (kx 2023-03-24 03:51:10 +0300 472)
05d292b2 (kx 2023-03-24 03:51:10 +0300 473) donate = true;
05d292b2 (kx 2023-03-24 03:51:10 +0300 474) donate-css = '/donations/donate.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 475) donate-html = '/donations/donate.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 476) donate-js = '/donations/donate.js';
05d292b2 (kx 2023-03-24 03:51:10 +0300 477) donate-header = "Donation";
05d292b2 (kx 2023-03-24 03:51:10 +0300 478) donate-purpose = "Support our activities";
05d292b2 (kx 2023-03-24 03:51:10 +0300 479)
05d292b2 (kx 2023-03-24 03:51:10 +0300 480) section "Tools" {
05d292b2 (kx 2023-03-24 03:51:10 +0300 481) repo 'repo-path' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 482) . . .
05d292b2 (kx 2023-03-24 03:51:10 +0300 483) donate-header = "Project Donation";
05d292b2 (kx 2023-03-24 03:51:10 +0300 484) donate-purpose = "Support our Project";
05d292b2 (kx 2023-03-24 03:51:10 +0300 485) . . .
05d292b2 (kx 2023-03-24 03:51:10 +0300 486) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 487) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 488) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 489)
05d292b2 (kx 2023-03-24 03:51:10 +0300 490) To show the modal dialogue in javascript code **donate-js** the selector **'a.donate'** should be used. For examle, like this:
05d292b2 (kx 2023-03-24 03:51:10 +0300 491)
05d292b2 (kx 2023-03-24 03:51:10 +0300 492) ```php
05d292b2 (kx 2023-03-24 03:51:10 +0300 493) var show = document.querySelector( "a.donate" );
05d292b2 (kx 2023-03-24 03:51:10 +0300 494)
05d292b2 (kx 2023-03-24 03:51:10 +0300 495) /**************
05d292b2 (kx 2023-03-24 03:51:10 +0300 496) Open Dialog:
05d292b2 (kx 2023-03-24 03:51:10 +0300 497) */
05d292b2 (kx 2023-03-24 03:51:10 +0300 498) show.onclick = function() {
05d292b2 (kx 2023-03-24 03:51:10 +0300 499) dialog.style.display = "block";
05d292b2 (kx 2023-03-24 03:51:10 +0300 500) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 501) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 502)
05d292b2 (kx 2023-03-24 03:51:10 +0300 503) Where the variable *dialog* points to modal dialogue defined in the **donate-html** file.
05d292b2 (kx 2023-03-24 03:51:10 +0300 504)
05d292b2 (kx 2023-03-24 03:51:10 +0300 505)
05d292b2 (kx 2023-03-24 03:51:10 +0300 506)
05d292b2 (kx 2023-03-24 03:51:10 +0300 507) ### Repository Declaration
05d292b2 (kx 2023-03-24 03:51:10 +0300 508)
05d292b2 (kx 2023-03-24 03:51:10 +0300 509) The **/etc/cgit-ui.rc** config file should contains at least one repository declaration to be shown
05d292b2 (kx 2023-03-24 03:51:10 +0300 510) by the **cGit-ui** CGI Script. When all expected variables declared in the global section
05d292b2 (kx 2023-03-24 03:51:10 +0300 511) the config file the repository declaration can be very simple:
05d292b2 (kx 2023-03-24 03:51:10 +0300 512)
05d292b2 (kx 2023-03-24 03:51:10 +0300 513) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 514) repo 'tools' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 515) owner = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 516) description = "John Smith's tools source code repository.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 517) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 518) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 519)
05d292b2 (kx 2023-03-24 03:51:10 +0300 520) The list of repositories can be splitted in several sections. The section has a name and can
05d292b2 (kx 2023-03-24 03:51:10 +0300 521) contains repository declarations only.
05d292b2 (kx 2023-03-24 03:51:10 +0300 522)
05d292b2 (kx 2023-03-24 03:51:10 +0300 523) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 524) section "John Smith sources" {
05d292b2 (kx 2023-03-24 03:51:10 +0300 525) repo 'tools' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 526) owner = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 527) description = "John Smith's tools source code repository.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 528) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 529) repo 'examples' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 530) owner = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 531) description = "John Smith's examples source code.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 532) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 533) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 534) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 535)
05d292b2 (kx 2023-03-24 03:51:10 +0300 536) Please note, repositories, unlike sections, do not have a name, but have a **path** to repository.
05d292b2 (kx 2023-03-24 03:51:10 +0300 537) So if your repositories in the file system are stored in the `/var/scm/git` directory, and the
05d292b2 (kx 2023-03-24 03:51:10 +0300 538) `tools` repository is located in the `/var/scm/git/tools` directory, then the path to the repository
05d292b2 (kx 2023-03-24 03:51:10 +0300 539) is set relative to the `/var/scm/git` directory as follows:
05d292b2 (kx 2023-03-24 03:51:10 +0300 540)
05d292b2 (kx 2023-03-24 03:51:10 +0300 541) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 542) repo 'tools' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 543) owner = "John Smith";
05d292b2 (kx 2023-03-24 03:51:10 +0300 544) description = "John Smith's tools source code repository.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 545) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 546) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 547)
05d292b2 (kx 2023-03-24 03:51:10 +0300 548)
05d292b2 (kx 2023-03-24 03:51:10 +0300 549) ## Working Example
05d292b2 (kx 2023-03-24 03:51:10 +0300 550)
05d292b2 (kx 2023-03-24 03:51:10 +0300 551) As an example, we will give a working configuration file in which the
05d292b2 (kx 2023-03-24 03:51:10 +0300 552) [**pkgtools.git**](https://cgit.radix.pro/pkgtools.git/trunk/) repository is presented.
05d292b2 (kx 2023-03-24 03:51:10 +0300 553)
05d292b2 (kx 2023-03-24 03:51:10 +0300 554) ```dts
05d292b2 (kx 2023-03-24 03:51:10 +0300 555) git-utc-offset = +0300;
05d292b2 (kx 2023-03-24 03:51:10 +0300 556)
05d292b2 (kx 2023-03-24 03:51:10 +0300 557) clone-prefix-readonly = 'git://radix.pro';
05d292b2 (kx 2023-03-24 03:51:10 +0300 558) clone-prefix = 'git://git@radix.pro:pub';
05d292b2 (kx 2023-03-24 03:51:10 +0300 559)
05d292b2 (kx 2023-03-24 03:51:10 +0300 560) trunk = 'master';
05d292b2 (kx 2023-03-24 03:51:10 +0300 561)
05d292b2 (kx 2023-03-24 03:51:10 +0300 562) snapshots = 'tar.xz';
05d292b2 (kx 2023-03-24 03:51:10 +0300 563)
05d292b2 (kx 2023-03-24 03:51:10 +0300 564) css = '/.cgit/css/cgit.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 565) logo = '/.cgit/pixmaps/cgit-banner-280x280.png';
05d292b2 (kx 2023-03-24 03:51:10 +0300 566) logo-alt = "Radix.pro";
05d292b2 (kx 2023-03-24 03:51:10 +0300 567) logo-link = "https://radix.pro";
05d292b2 (kx 2023-03-24 03:51:10 +0300 568) main-menu-logo = '/.cgit/pixmaps/logo/git-logo-white-256x256.svg';
05d292b2 (kx 2023-03-24 03:51:10 +0300 569) favicon-path = '/.cgit/pixmaps/favicon';
05d292b2 (kx 2023-03-24 03:51:10 +0300 570) syntax-highlight-css = '_cgit.css';
05d292b2 (kx 2023-03-24 03:51:10 +0300 571) header = '/.cgit/html/header.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 572) footer = '/.cgit/html/footer.html';
05d292b2 (kx 2023-03-24 03:51:10 +0300 573) page-size = 200;
05d292b2 (kx 2023-03-24 03:51:10 +0300 574)
05d292b2 (kx 2023-03-24 03:51:10 +0300 575) owner = "Andrey V.Kosteltsev";
05d292b2 (kx 2023-03-24 03:51:10 +0300 576) author = "Andrey V.Kosteltsev";
05d292b2 (kx 2023-03-24 03:51:10 +0300 577) title = "Radix.pro Git Repositories";
05d292b2 (kx 2023-03-24 03:51:10 +0300 578) description = "Git repositories hosted at radix.pro (St.-Petersburg)";
05d292b2 (kx 2023-03-24 03:51:10 +0300 579) keywords = "cGit repositories cgit-ui web web-ui user interface Git";
05d292b2 (kx 2023-03-24 03:51:10 +0300 580) copyright = "© Andrey V. Kosteltsev, 2019 – 2022.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 581) copyright-notice = "Where any material of this site is being reproduced, published or issued to others the reference to the source is obligatory.";
05d292b2 (kx 2023-03-24 03:51:10 +0300 582)
05d292b2 (kx 2023-03-24 03:51:10 +0300 583) home-page = "https://radix.pro/";
05d292b2 (kx 2023-03-24 03:51:10 +0300 584)
05d292b2 (kx 2023-03-24 03:51:10 +0300 585) section "Tools" {
05d292b2 (kx 2023-03-24 03:51:10 +0300 586) repo 'pkgtools.git' {
05d292b2 (kx 2023-03-24 03:51:10 +0300 587) owner = "Andrey V.Kosteltsev";
05d292b2 (kx 2023-03-24 03:51:10 +0300 588) title = "Package Tools Utilities";
05d292b2 (kx 2023-03-24 03:51:10 +0300 589) description = "Pkgtools – is a set of utilities to create, install, remove and update packages";
05d292b2 (kx 2023-03-24 03:51:10 +0300 590) home-page = "https://radix.pro/";
05d292b2 (kx 2023-03-24 03:51:10 +0300 591) git-root = '/u3/scm/git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 592) clone-prefix-readonly = 'git://git@radix.pro:git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 593) clone-prefix = 'git://git@radix.pro:git';
05d292b2 (kx 2023-03-24 03:51:10 +0300 594) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 595) }
05d292b2 (kx 2023-03-24 03:51:10 +0300 596)
05d292b2 (kx 2023-03-24 03:51:10 +0300 597) ```
05d292b2 (kx 2023-03-24 03:51:10 +0300 598)
05d292b2 (kx 2023-03-24 03:51:10 +0300 599)
05d292b2 (kx 2023-03-24 03:51:10 +0300 600) ## See Also
05d292b2 (kx 2023-03-24 03:51:10 +0300 601)
05d292b2 (kx 2023-03-24 03:51:10 +0300 602) > [**README**](https://csvn.radix.pro/cgit-ui/trunk/README.md),
05d292b2 (kx 2023-03-24 03:51:10 +0300 603) > [**cscmd(8)**](https://csvn.radix.pro/cscm/trunk/doc/cscmd.8.md)
05d292b2 (kx 2023-03-24 03:51:10 +0300 604)