Skip to content

Commit eca4f3b

Browse files
committed
Merge branch 'jn/gitweb-docs'
* jn/gitweb-docs: gitweb: Move "Requirements" up in gitweb/INSTALL gitweb: Describe CSSMIN and JSMIN in gitweb/INSTALL gitweb: Move information about installation from README to INSTALL
2 parents 456a4c0 + 80b4dfe commit eca4f3b

File tree

2 files changed

+135
-131
lines changed

2 files changed

+135
-131
lines changed

gitweb/INSTALL

Lines changed: 135 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,25 @@ The above example assumes that your web server is configured to run
2525
scripts).
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+
2843
Build 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+
76209
Build 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-
247365
Example web server configuration
248366
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249367

gitweb/README

Lines changed: 0 additions & 114 deletions
Original file line numberDiff line numberDiff line change
@@ -7,120 +7,6 @@ The one working on:
77
From the git version 1.4.0 gitweb is bundled with git.
88

99

10-
How to configure gitweb for your local system
11-
---------------------------------------------
12-
13-
See also the "Build time configuration" section in the INSTALL
14-
file for gitweb (in gitweb/INSTALL).
15-
16-
You can specify the following configuration variables when building GIT:
17-
* GIT_BINDIR
18-
Points where to find the git executable. You should set it up to
19-
the place where the git binary was installed (usually /usr/bin) if you
20-
don't install git from sources together with gitweb. [Default: $(bindir)]
21-
* GITWEB_SITENAME
22-
Shown in the title of all generated pages, defaults to the server name
23-
(SERVER_NAME CGI environment variable) if not set. [No default]
24-
* GITWEB_PROJECTROOT
25-
The root directory for all projects shown by gitweb. Must be set
26-
correctly for gitweb to find repositories to display. See also
27-
"Gitweb repositories" in the INSTALL file for gitweb. [Default: /pub/git]
28-
* GITWEB_PROJECT_MAXDEPTH
29-
The filesystem traversing limit for getting the project list; the number
30-
is taken as depth relative to the projectroot. It is used when
31-
GITWEB_LIST is a directory (or is not set; then project root is used).
32-
This is meant to speed up project listing on large work trees by limiting
33-
search depth. [Default: 2007]
34-
* GITWEB_LIST
35-
Points to a directory to scan for projects (defaults to project root
36-
if not set / if empty) or to a file with explicit listing of projects
37-
(together with projects' ownership). See "Generating projects list
38-
using gitweb" in INSTALL file for gitweb to find out how to generate
39-
such file from scan of a directory. [No default, which means use root
40-
directory for projects]
41-
* GITWEB_EXPORT_OK
42-
Show repository only if this file exists (in repository). Only
43-
effective if this variable evaluates to true. [No default / Not set]
44-
* GITWEB_STRICT_EXPORT
45-
Only allow viewing of repositories also shown on the overview page.
46-
This for example makes GITWEB_EXPORT_OK to decide if repository is
47-
available and not only if it is shown. If GITWEB_LIST points to
48-
file with list of project, only those repositories listed would be
49-
available for gitweb. [No default]
50-
* GITWEB_HOMETEXT
51-
Points to an .html file which is included on the gitweb project
52-
overview page ('projects_list' view), if it exists. Relative to
53-
gitweb.cgi script. [Default: indextext.html]
54-
* GITWEB_SITE_HEADER
55-
Filename of html text to include at top of each page. Relative to
56-
gitweb.cgi script. [No default]
57-
* GITWEB_SITE_FOOTER
58-
Filename of html text to include at bottom of each page. Relative to
59-
gitweb.cgi script. [No default]
60-
* GITWEB_HOME_LINK_STR
61-
String of the home link on top of all pages, leading to $home_link
62-
(usually main gitweb page, which means projects list). Used as first
63-
part of gitweb view "breadcrumb trail": <home> / <project> / <view>.
64-
[Default: projects]
65-
* GITWEB_SITENAME
66-
Name of your site or organization to appear in page titles. Set it
67-
to something descriptive for clearer bookmarks etc. If not set
68-
(if empty) gitweb uses "$SERVER_NAME Git", or "Untitled Git" if
69-
SERVER_NAME CGI environment variable is not set (e.g. if running
70-
gitweb as standalone script). [No default]
71-
* GITWEB_BASE_URL
72-
Git base URLs used for URL to where fetch project from, i.e. full
73-
URL is "$git_base_url/$project". Shown on projects summary page.
74-
Repository URL for project can be also configured per repository; this
75-
takes precedence over URLs composed from base URL and a project name.
76-
Note that you can setup multiple base URLs (for example one for
77-
git:// protocol access, another for http:// access) from the gitweb
78-
config file. [No default]
79-
* GITWEB_CSS
80-
Points to the location where you put gitweb.css on your web server
81-
(or to be more generic, the URI of gitweb stylesheet). Relative to the
82-
base URI of gitweb. Note that you can setup multiple stylesheets from
83-
the gitweb config file. [Default: static/gitweb.css (or
84-
static/gitweb.min.css if the CSSMIN variable is defined / CSS minifier
85-
is used)]
86-
* GITWEB_LOGO
87-
Points to the location where you put git-logo.png on your web server
88-
(or to be more generic URI of logo, 72x27 size, displayed in top right
89-
corner of each gitweb page, and used as logo for Atom feed). Relative
90-
to base URI of gitweb. [Default: static/git-logo.png]
91-
* GITWEB_FAVICON
92-
Points to the location where you put git-favicon.png on your web server
93-
(or to be more generic URI of favicon, assumed to be image/png type;
94-
web browsers that support favicons (website icons) may display them
95-
in the browser's URL bar and next to site name in bookmarks). Relative
96-
to base URI of gitweb. [Default: static/git-favicon.png]
97-
* GITWEB_JS
98-
Points to the location where you put gitweb.js on your web server
99-
(or to be more generic URI of JavaScript code used by gitweb).
100-
Relative to base URI of gitweb. [Default: static/gitweb.js (or
101-
static/gitweb.min.js if JSMIN build variable is defined / JavaScript
102-
minifier is used)]
103-
* GITWEB_CONFIG
104-
This Perl file will be loaded using 'do' and can be used to override any
105-
of the options above as well as some other options -- see the "Runtime
106-
gitweb configuration" section below, and top of 'gitweb.cgi' for their
107-
full list and description. If the environment variable GITWEB_CONFIG
108-
is set when gitweb.cgi is executed, then the file specified in the
109-
environment variable will be loaded instead of the file specified
110-
when gitweb.cgi was created. [Default: gitweb_config.perl]
111-
* GITWEB_CONFIG_SYSTEM
112-
This Perl file will be loaded using 'do' as a fallback if GITWEB_CONFIG
113-
does not exist. If the environment variable GITWEB_CONFIG_SYSTEM is set
114-
when gitweb.cgi is executed, then the file specified in the environment
115-
variable will be loaded instead of the file specified when gitweb.cgi was
116-
created. [Default: /etc/gitweb.conf]
117-
* HIGHLIGHT_BIN
118-
Path to the highlight executable to use (must be the one from
119-
http://www.andre-simon.de due to assumptions about parameters and output).
120-
Useful if highlight is not installed on your webserver's PATH.
121-
[Default: highlight]
122-
123-
12410
Runtime gitweb configuration
12511
----------------------------
12612

0 commit comments

Comments
 (0)