diff options
author | Lénaïc Huard <lenaic@lhuard.fr.eu.org> | 2011-10-21 09:09:29 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-10-21 10:18:37 -0700 |
commit | c1355b7ffb6573ff7c76aef7d3bab664fb895dc8 (patch) | |
tree | dd1ee84d3d0001032d58912b98b2805605cf5661 /gitweb/gitweb.perl | |
parent | 55752fa8610ebc16a1ebda2bcaf73f82142dde30 (diff) | |
download | git-c1355b7ffb6573ff7c76aef7d3bab664fb895dc8.tar.gz git-c1355b7ffb6573ff7c76aef7d3bab664fb895dc8.tar.xz |
gitweb: provide a way to customize html headers
This allows web sites to add some specific html headers to the pages
generated by gitweb.
The new variable $site_html_head_string can be set to an html snippet that
will be inserted at the end of the <head> section of each page generated
by gitweb.
Signed-off-by: Lénaïc Huard <lenaic@lhuard.fr.eu.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-x | gitweb/gitweb.perl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 70a576a62..d33510804 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -85,6 +85,8 @@ our $home_link_str = "++GITWEB_HOME_LINK_STR++"; our $site_name = "++GITWEB_SITENAME++" || ($ENV{'SERVER_NAME'} || "Untitled") . " Git"; +# html snippet to include in the <head> section of each page +our $site_html_head_string = "++GITWEB_SITE_HTML_HEAD_STRING++"; # filename of html text to include at top of each page our $site_header = "++GITWEB_SITE_HEADER++"; # html text to include at home page @@ -3868,6 +3870,11 @@ EOF print "<base href=\"".esc_url($base_url)."\" />\n"; } print_header_links($status); + + if (defined $site_html_head_string) { + print to_utf8($site_html_head_string); + } + print "</head>\n" . "<body>\n"; |