cGit-UI for Git Repositories

cGit-UI – is a web interface for Git Repositories. cGit CGI script is writen in C and therefore it's fast enough

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