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>
This commit is contained in:
Lénaïc Huard
2011-10-21 09:09:29 +02:00
committed by Junio C Hamano
parent 55752fa861
commit c1355b7ffb
5 changed files with 17 additions and 0 deletions

View File

@ -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";