Merge branch 'master' into rorcz
[girocco.git] / gitweb / gitweb_config.perl
blob643610d88fa42e25d262dedd552d4341038f4c26
1 # Pull Girocco config
2 use lib ".";
3 use Girocco::Config;
4 use Girocco::Util;
5 use Digest::MD5 qw(md5_hex);
6 BEGIN {
7 eval { require HTML::Email::Obfuscate; 1 } or
8 eval {
9 require Girocco::Email::Obfuscate;
10 $INC{'HTML/Email/Obfuscate.pm'} = $INC{'Girocco/Email/Obfuscate.pm'}; # mwahaha
14 ## For the complete overview of available configuration options,
15 ## see git.git/gitweb/gitweb.perl file beginning (git.git/gitweb/README
16 ## may miss some custom patches, in theory).
18 # Whether to include project list on the gitweb front page; 0 means yes,
19 # 1 means no list but show tag cloud if enabled (all projects still need
20 # to be scanned, unless the info is cached), 2 means no list and no tag cloud
21 # (very fast)
22 our $frontpage_no_project_list = 1;
24 ## projects list cache for busy sites with many projects;
25 ## if you set this to non-zero, it will be used as the cached
26 ## index lifetime in minutes
27 our $projlist_cache_lifetime = 525600; # 1y
29 ## default charset for text/plain blob
30 our $default_text_plain_charset = 'utf-8';
32 # Comment out to disable ctags
33 $feature{'ctags'}{'default'}=["@{[url_path($Girocco::Config::webadmurl)]}/tagproj.cgi"];
35 $feature{'blame'}{'default'}=[1];
37 $feature{'snapshot'}{'default'} = ['tgz', 'zip'];
38 $feature{'snapshot'}{'override'} = 1;
41 ### You probably don't really want to tweak anything below.
43 # Base web path
44 our $my_uri = url_path($Girocco::Config::gitweburl);
46 # https hint html inserted right after any https push URL (undef for none)
47 # e.g. "<a href="https_push_instructions.html">https push instructions</a>"
48 our $https_hint_html = undef;
49 $https_hint_html = substr(<<HINT,0,-1) if $Girocco::Config::httpspushurl;
50 <sup><a href="@{[url_path($Girocco::Config::htmlurl)]}/httpspush.html">(learn more)</a></sup>
51 HINT
53 # owner link hook given owner name (full and NOT obfuscated)
54 # should return full URL-escaped link to attach to owner, for example:
55 # sub { return "/showowner.cgi?owner=".CGI::Util::escape($_[0]); }
56 our $owner_link_hook = undef;
57 $owner_link_hook = sub { url_path($Girocco::Config::webadmurl)."/projlist.cgi?name=".md5_hex($_[0]); };
59 ## core git executable to use
60 ## this can just be "git" if your webserver has a sensible PATH
61 our $GIT = $Girocco::Config::git_bin;
63 ## absolute fs-path which will be prepended to the project path
64 our $projectroot = $Girocco::Config::reporoot;
65 # source of projects list
66 our $projects_list = $Girocco::Config::chroot."/etc/gitweb.list";
68 ## target of the home link on top of all pages
69 our $home_link = url_path($Girocco::Config::gitweburl);
71 ## string of the home link on top of all pages
72 our $home_link_str = $Girocco::Config::name;
74 ## name of your site or organization to appear in page titles
75 ## replace this with something more descriptive for clearer bookmarks
76 our $site_name = $Girocco::Config::title;
77 ## html text to include at home page
78 our $home_text = "$Girocco::Config::webroot/indextext.html";
80 ## URI of stylesheets
81 our @stylesheets = ("@{[url_path($Girocco::Config::gitwebfiles)]}/gitweb.css");
82 ## URI of GIT logo (72x27 size)
83 our $logo = "@{[url_path($Girocco::Config::gitwebfiles)]}/git-logo.png";
84 ## URI of GIT favicon, assumed to be image/png type
85 our $favicon = "@{[url_path($Girocco::Config::gitwebfiles)]}/git-favicon.png";
86 ## URI of blame.js
87 our $blamejs = "@{[url_path($Girocco::Config::gitwebfiles)]}/blame.js";
88 ## URI of gitweb.js
89 our $gitwebjs = "@{[url_path($Girocco::Config::gitwebfiles)]}/gitweb.js";
91 ## list of git base URLs used for URL to fetch project from,
92 ## i.e. full URL is "$git_base_url/$project"
93 our @git_base_url_list = ();
94 $Girocco::Config::gitpullurl and push @git_base_url_list, $Girocco::Config::gitpullurl;
95 $Girocco::Config::httppullurl and push @git_base_url_list, $Girocco::Config::httppullurl;
97 ## list of git base URLs used for URL to push project to,
98 ## i.e. full URL is "$git_base_push_url/$project"
99 our @git_base_push_urls = ();
100 $Girocco::Config::pushurl and push @git_base_push_urls, $Girocco::Config::pushurl;
101 $Girocco::Config::httpspushurl and push @git_base_push_urls, $Girocco::Config::httpspushurl;
103 our $cache_grpshared = 1;
104 our $cache_dir = $Girocco::Config::chroot.'/etc';
105 umask 002; # required for $cache_grpshared != 0 to work properly
107 $feature{'pathinfo'}{'default'}=[1];
109 $feature{'forks'}{'default'}=[1];
111 $feature{'actions'}{'default'}=[
112 ('graphiclog', "@{[url_path($Girocco::Config::gitwebfiles)]}/git-browser/by-commit.html?r=%n", 'log'),
113 ('edit', "@{[url_path($Girocco::Config::webadmurl)]}/editproj.cgi?name=%n", 'refs'),
114 ('fork', "@{[url_path($Girocco::Config::webadmurl)]}/regproj.cgi?fork=%n", 'edit')