From c1355b7ffb6573ff7c76aef7d3bab664fb895dc8 Mon Sep 17 00:00:00 2001 From: Lénaïc Huard Date: Fri, 21 Oct 2011 09:09:29 +0200 Subject: gitweb: provide a way to customize html headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 section of each page generated by gitweb. Signed-off-by: Lénaïc Huard Signed-off-by: Junio C Hamano --- gitweb/gitweb.perl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gitweb/gitweb.perl') diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 70a576a626..d33510804b 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 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 "\n"; } print_header_links($status); + + if (defined $site_html_head_string) { + print to_utf8($site_html_head_string); + } + print "\n" . "\n"; -- cgit v1.2.3