install.sh: move gitweb and git-browser configs into basedir/gitweb
[girocco.git] / gitweb / gitweb_config.perl
blob2da2fbe7f40b7876d9b2f0b6309fbd7d3aefba41
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 # rename detection options for git-diff and git-diff-tree (default is '-M')
19 our @diff_opts = ('-B', '-C');
21 # Whether to include project list on the gitweb front page; 0 means yes,
22 # 1 means no list but show tag cloud if enabled (all projects still need
23 # to be scanned, unless the info is cached), 2 means no list and no tag cloud
24 # (very fast)
25 our $frontpage_no_project_list = 1;
27 ## projects list cache for busy sites with many projects;
28 ## if you set this to non-zero, it will be used as the cached
29 ## index lifetime in minutes
30 our $projlist_cache_lifetime = 10;
32 ## default charset for text/plain blob
33 our $default_text_plain_charset = 'utf-8';
35 # Comment out to disable ctags
36 $feature{'ctags'}{'default'}=["@{[url_path($Girocco::Config::webadmurl)]}/tagproj.cgi"];
38 $feature{'blame'}{'default'}=[1];
39 $feature{'blame_incremental'}{'default'}=[1];
41 $feature{'snapshot'}{'default'} = ['tgz', 'zip'];
43 # Enable override to turn off snapshots on a per-repository basis with config gitweb.snapshot=none
44 #$feature{'snapshot'}{'override'} = 1;
46 # Enable this to highlight sources if highlight is available
47 #$feature{'highlight'}{'default'} = [1];
49 # Set this if highlight is enabled and not available as 'highlight' in $PATH
50 #our $highlight_bin = "highlight";
52 ### You probably don't really want to tweak anything below.
54 # Base web path
55 our $my_uri = url_path($Girocco::Config::gitweburl);
57 # https hint html inserted right after any https push URL (undef for none)
58 # e.g. "<a href="https_push_instructions.html">https push instructions</a>"
59 our $https_hint_html = undef;
60 $https_hint_html = substr(<<HINT,0,-1) if $Girocco::Config::httpspushurl;
61 <sup><a href="@{[url_path($Girocco::Config::htmlurl)]}/httpspush.html">(learn&#160;more)</a></sup>
62 HINT
64 # owner link hook given owner name (full and NOT obfuscated)
65 # should return full URL-escaped link to attach to owner, for example:
66 # sub { return "/showowner.cgi?owner=".CGI::Util::escape($_[0]); }
67 our $owner_link_hook = undef;
68 $owner_link_hook = sub { url_path($Girocco::Config::webadmurl)."/projlist.cgi?name=".md5_hex(lc($_[0])); };
70 ## core git executable to use
71 ## this can just be "git" if your webserver has a sensible PATH
72 our $GIT = $Girocco::Config::git_bin;
74 ## absolute fs-path which will be prepended to the project path
75 our $projectroot = $Girocco::Config::reporoot;
76 # source of projects list
77 our $projects_list = $Girocco::Config::chroot."/etc/gitweb.list";
79 ## target of the home link on top of all pages
80 our $home_link = url_path($Girocco::Config::gitweburl,1);
82 ## string of the home link on top of all pages
83 our $home_link_str = $Girocco::Config::name;
85 ## name of your site or organization to appear in page titles
86 ## replace this with something more descriptive for clearer bookmarks
87 our $site_name = $Girocco::Config::title;
88 ## html text to include at home page
89 our $home_text = "$Girocco::Config::basedir/gitweb/indextext.html";
91 ## URI of stylesheets
92 our @stylesheets = ("@{[url_path($Girocco::Config::gitwebfiles)]}/gitweb.css");
93 ## URI of GIT logo (72x27 size)
94 our $logo = "@{[url_path($Girocco::Config::gitwebfiles)]}/git-logo.png";
95 ## URI of GIT favicon, assumed to be image/png type
96 our $favicon = "@{[url_path($Girocco::Config::gitwebfiles)]}/git-favicon.png";
97 ## URI of gitweb.js
98 our $javascript = "@{[url_path($Girocco::Config::gitwebfiles)]}/gitweb.js";
100 ## list of git base URLs used for URL to fetch project from,
101 ## i.e. full URL is "$git_base_url/$project"
102 our @git_base_url_list = ();
103 $Girocco::Config::gitpullurl and push @git_base_url_list, $Girocco::Config::gitpullurl;
104 $Girocco::Config::httppullurl and push @git_base_url_list, $Girocco::Config::httppullurl;
106 ## list of git base URLs used for URL to push project to,
107 ## i.e. full URL is "$git_base_push_url/$project"
108 our @git_base_push_urls = ();
109 $Girocco::Config::pushurl and push @git_base_push_urls, $Girocco::Config::pushurl;
110 $Girocco::Config::httpspushurl and push @git_base_push_urls, $Girocco::Config::httpspushurl;
112 our $cache_grpshared = 1;
113 our $cache_dir = $Girocco::Config::chroot.'/etc';
115 our $lastactivity_file = "info/lastactivity";
117 $html_cache_actions{'summary'} = 1;
119 our $per_request_config = 0;
121 our $auto_fcgi = 1;
123 $feature{'pathinfo'}{'default'}=[1];
125 $feature{'forks'}{'default'}=[1];
127 $feature{'actions'}{'default'}=[
128 ('graphiclog', "@{[url_path($Girocco::Config::gitwebfiles)]}/git-browser/by-commit.html?r=%n", 'log'),
129 ('edit', "@{[url_path($Girocco::Config::webadmurl)]}/editproj.cgi?name=%e", 'refs'),
130 ('fork', "@{[url_path($Girocco::Config::webadmurl)]}/regproj.cgi?fork=%e", 'edit')