File tree Expand file tree Collapse file tree 5 files changed +17
-0
lines changed
Expand file tree Collapse file tree 5 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -364,6 +364,11 @@ $site_name::
364364+
365365Can be set using the `GITWEB_SITENAME` at build time. Unset by default.
366366
367+ $site_html_head_string::
368+ HTML snippet to be included in the <head> section of each page.
369+ Can be set using `GITWEB_SITE_HTML_HEAD_STRING` at build time.
370+ No default value.
371+
367372$site_header::
368373 Name of a file with HTML to be included at the top of each page.
369374 Relative to the directory containing the 'gitweb.cgi' script.
Original file line number Diff line number Diff line change @@ -130,6 +130,8 @@ You can specify the following configuration variables when building GIT:
130130 Points to an .html file which is included on the gitweb project
131131 overview page ('projects_list' view), if it exists. Relative to
132132 gitweb.cgi script. [Default: indextext.html]
133+ * GITWEB_SITE_HTML_HEAD_STRING
134+ html snippet to include in the <head> section of each page. [No default]
133135 * GITWEB_SITE_HEADER
134136 Filename of html text to include at top of each page. Relative to
135137 gitweb.cgi script. [No default]
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ GITWEB_CSS = static/gitweb.css
3434GITWEB_LOGO = static/git-logo.png
3535GITWEB_FAVICON = static/git-favicon.png
3636GITWEB_JS = static/gitweb.js
37+ GITWEB_SITE_HTML_HEAD_STRING =
3738GITWEB_SITE_HEADER =
3839GITWEB_SITE_FOOTER =
3940HIGHLIGHT_BIN = highlight
@@ -144,6 +145,7 @@ GITWEB_REPLACE = \
144145 -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO ) |g' \
145146 -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON ) |g' \
146147 -e 's|++GITWEB_JS++|$(GITWEB_JS ) |g' \
148+ -e 's|++GITWEB_SITE_HTML_HEAD_STRING++|$(GITWEB_SITE_HTML_HEAD_STRING ) |g' \
147149 -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER ) |g' \
148150 -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER ) |g' \
149151 -e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN ) |g'
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ sub evaluate_uri {
8585our $site_name = " ++GITWEB_SITENAME++"
8686 || ($ENV {' SERVER_NAME' } || " Untitled" ) . " Git" ;
8787
88+ # html snippet to include in the <head> section of each page
89+ our $site_html_head_string = " ++GITWEB_SITE_HTML_HEAD_STRING++" ;
8890# filename of html text to include at top of each page
8991our $site_header = " ++GITWEB_SITE_HEADER++" ;
9092# html text to include at home page
@@ -3868,6 +3870,11 @@ sub git_header_html {
38683870 print " <base href=\" " .esc_url($base_url )." \" />\n " ;
38693871 }
38703872 print_header_links($status );
3873+
3874+ if (defined $site_html_head_string ) {
3875+ print to_utf8($site_html_head_string );
3876+ }
3877+
38713878 print " </head>\n " .
38723879 " <body>\n " ;
38733880
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ our \$projectroot = "$safe_pwd";
1616our \$ project_maxdepth = 8;
1717our \$ home_link_str = 'projects';
1818our \$ site_name = '[localhost]';
19+ our \$ site_html_head_string = '';
1920our \$ site_header = '';
2021our \$ site_footer = '';
2122our \$ home_text = 'indextext.html';
You can’t perform that action at this time.
0 commit comments