@@ -25,11 +25,25 @@ The above example assumes that your web server is configured to run
2525scripts).
2626
2727
28+ Requirements
29+ ------------
30+
31+ - Core git tools
32+ - Perl
33+ - Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
34+ - web server
35+
36+ The following optional Perl modules are required for extra features
37+ - Digest::MD5 - for gravatar support
38+ - CGI::Fast and FCGI - for running gitweb as FastCGI script
39+ - HTML::TagCloud - for fancy tag cloud in project list view
40+ - HTTP::Date or Time::ParseDate - to support If-Modified-Since for feeds
41+
42+
2843Build time configuration
2944------------------------
3045
31- See also "How to configure gitweb for your local system" in README
32- file for gitweb (in gitweb/README).
46+ See also "How to configure gitweb for your local system" section below.
3347
3448- There are many configuration variables which affect building of
3549 gitweb.cgi; see "default configuration for gitweb" section in main
@@ -73,6 +87,125 @@ file for gitweb (in gitweb/README).
7387 substitute gitweb.min.js and gitweb.min.css for all uses of gitweb.js and
7488 gitweb.css in the help files.
7589
90+
91+ How to configure gitweb for your local system
92+ ---------------------------------------------
93+
94+ You can specify the following configuration variables when building GIT:
95+
96+ * GIT_BINDIR
97+ Points where to find the git executable. You should set it up to
98+ the place where the git binary was installed (usually /usr/bin) if you
99+ don't install git from sources together with gitweb. [Default: $(bindir)]
100+ * GITWEB_SITENAME
101+ Shown in the title of all generated pages, defaults to the server name
102+ (SERVER_NAME CGI environment variable) if not set. [No default]
103+ * GITWEB_PROJECTROOT
104+ The root directory for all projects shown by gitweb. Must be set
105+ correctly for gitweb to find repositories to display. See also
106+ "Gitweb repositories" in the INSTALL file for gitweb. [Default: /pub/git]
107+ * GITWEB_PROJECT_MAXDEPTH
108+ The filesystem traversing limit for getting the project list; the number
109+ is taken as depth relative to the projectroot. It is used when
110+ GITWEB_LIST is a directory (or is not set; then project root is used).
111+ This is meant to speed up project listing on large work trees by limiting
112+ search depth. [Default: 2007]
113+ * GITWEB_LIST
114+ Points to a directory to scan for projects (defaults to project root
115+ if not set / if empty) or to a file with explicit listing of projects
116+ (together with projects' ownership). See "Generating projects list
117+ using gitweb" in INSTALL file for gitweb to find out how to generate
118+ such file from scan of a directory. [No default, which means use root
119+ directory for projects]
120+ * GITWEB_EXPORT_OK
121+ Show repository only if this file exists (in repository). Only
122+ effective if this variable evaluates to true. [No default / Not set]
123+ * GITWEB_STRICT_EXPORT
124+ Only allow viewing of repositories also shown on the overview page.
125+ This for example makes GITWEB_EXPORT_OK to decide if repository is
126+ available and not only if it is shown. If GITWEB_LIST points to
127+ file with list of project, only those repositories listed would be
128+ available for gitweb. [No default]
129+ * GITWEB_HOMETEXT
130+ Points to an .html file which is included on the gitweb project
131+ overview page ('projects_list' view), if it exists. Relative to
132+ gitweb.cgi script. [Default: indextext.html]
133+ * GITWEB_SITE_HEADER
134+ Filename of html text to include at top of each page. Relative to
135+ gitweb.cgi script. [No default]
136+ * GITWEB_SITE_FOOTER
137+ Filename of html text to include at bottom of each page. Relative to
138+ gitweb.cgi script. [No default]
139+ * GITWEB_HOME_LINK_STR
140+ String of the home link on top of all pages, leading to $home_link
141+ (usually main gitweb page, which means projects list). Used as first
142+ part of gitweb view "breadcrumb trail": <home> / <project> / <view>.
143+ [Default: projects]
144+ * GITWEB_SITENAME
145+ Name of your site or organization to appear in page titles. Set it
146+ to something descriptive for clearer bookmarks etc. If not set
147+ (if empty) gitweb uses "$SERVER_NAME Git", or "Untitled Git" if
148+ SERVER_NAME CGI environment variable is not set (e.g. if running
149+ gitweb as standalone script). [No default]
150+ * GITWEB_BASE_URL
151+ Git base URLs used for URL to where fetch project from, i.e. full
152+ URL is "$git_base_url/$project". Shown on projects summary page.
153+ Repository URL for project can be also configured per repository; this
154+ takes precedence over URLs composed from base URL and a project name.
155+ Note that you can setup multiple base URLs (for example one for
156+ git:// protocol access, another for http:// access) from the gitweb
157+ config file. [No default]
158+ * GITWEB_CSS
159+ Points to the location where you put gitweb.css on your web server
160+ (or to be more generic, the URI of gitweb stylesheet). Relative to the
161+ base URI of gitweb. Note that you can setup multiple stylesheets from
162+ the gitweb config file. [Default: static/gitweb.css (or
163+ static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier
164+ is used)]
165+ * GITWEB_JS
166+ Points to the location where you put gitweb.js on your web server
167+ (or to be more generic URI of JavaScript code used by gitweb).
168+ Relative to base URI of gitweb. [Default: static/gitweb.js (or
169+ static/gitweb.min.js if JSMIN build variable is defined / JavaScript
170+ minifier is used)]
171+ * CSSMIN, JSMIN
172+ Invocation of a CSS minifier or a JavaScript minifier, respectively,
173+ working as a filter (source on standard input, minified result on
174+ standard output). If set, it is used to generate a minified version of
175+ 'static/gitweb.css' or 'static/gitweb.js', respectively. *Note* that
176+ minified files would have *.min.css and *.min.js extension, which is
177+ important if you also set GITWEB_CSS and/or GITWEB_JS. [No default]
178+ * GITWEB_LOGO
179+ Points to the location where you put git-logo.png on your web server
180+ (or to be more generic URI of logo, 72x27 size, displayed in top right
181+ corner of each gitweb page, and used as logo for Atom feed). Relative
182+ to base URI of gitweb. [Default: static/git-logo.png]
183+ * GITWEB_FAVICON
184+ Points to the location where you put git-favicon.png on your web server
185+ (or to be more generic URI of favicon, assumed to be image/png type;
186+ web browsers that support favicons (website icons) may display them
187+ in the browser's URL bar and next to site name in bookmarks). Relative
188+ to base URI of gitweb. [Default: static/git-favicon.png]
189+ * GITWEB_CONFIG
190+ This Perl file will be loaded using 'do' and can be used to override any
191+ of the options above as well as some other options -- see the "Runtime
192+ gitweb configuration" section below, and top of 'gitweb.cgi' for their
193+ full list and description. If the environment variable GITWEB_CONFIG
194+ is set when gitweb.cgi is executed, then the file specified in the
195+ environment variable will be loaded instead of the file specified
196+ when gitweb.cgi was created. [Default: gitweb_config.perl]
197+ * GITWEB_CONFIG_SYSTEM
198+ This Perl file will be loaded using 'do' as a fallback if GITWEB_CONFIG
199+ does not exist. If the environment variable GITWEB_CONFIG_SYSTEM is set
200+ when gitweb.cgi is executed, then the file specified in the environment
201+ variable will be loaded instead of the file specified when gitweb.cgi was
202+ created. [Default: /etc/gitweb.conf]
203+ * HIGHLIGHT_BIN
204+ Path to the highlight executable to use (must be the one from
205+ http://www.andre-simon.de due to assumptions about parameters and output).
206+ Useful if highlight is not installed on your webserver's PATH.
207+ [Default: highlight]
208+
76209Build example
77210~~~~~~~~~~~~~
78211
@@ -229,21 +362,6 @@ $projects_list variable in gitweb config):
229362 perl -- /var/www/cgi-bin/gitweb.cgi
230363
231364
232- Requirements
233- ------------
234-
235- - Core git tools
236- - Perl
237- - Perl modules: CGI, Encode, Fcntl, File::Find, File::Basename.
238- - web server
239-
240- The following optional Perl modules are required for extra features
241- - Digest::MD5 - for gravatar support
242- - CGI::Fast and FCGI - for running gitweb as FastCGI script
243- - HTML::TagCloud - for fancy tag cloud in project list view
244- - HTTP::Date or Time::ParseDate - to support If-Modified-Since for feeds
245-
246-
247365Example web server configuration
248366~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249367
0 commit comments