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::
364
364
+
365
365
Can be set using the `GITWEB_SITENAME` at build time. Unset by default.
366
366
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
+
367
372
$site_header::
368
373
Name of a file with HTML to be included at the top of each page.
369
374
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:
130
130
Points to an .html file which is included on the gitweb project
131
131
overview page ('projects_list' view), if it exists. Relative to
132
132
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]
133
135
* GITWEB_SITE_HEADER
134
136
Filename of html text to include at top of each page. Relative to
135
137
gitweb.cgi script. [No default]
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ GITWEB_CSS = static/gitweb.css
34
34
GITWEB_LOGO = static/git-logo.png
35
35
GITWEB_FAVICON = static/git-favicon.png
36
36
GITWEB_JS = static/gitweb.js
37
+ GITWEB_SITE_HTML_HEAD_STRING =
37
38
GITWEB_SITE_HEADER =
38
39
GITWEB_SITE_FOOTER =
39
40
HIGHLIGHT_BIN = highlight
@@ -144,6 +145,7 @@ GITWEB_REPLACE = \
144
145
-e 's|++GITWEB_LOGO++|$(GITWEB_LOGO ) |g' \
145
146
-e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON ) |g' \
146
147
-e 's|++GITWEB_JS++|$(GITWEB_JS ) |g' \
148
+ -e 's|++GITWEB_SITE_HTML_HEAD_STRING++|$(GITWEB_SITE_HTML_HEAD_STRING ) |g' \
147
149
-e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER ) |g' \
148
150
-e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER ) |g' \
149
151
-e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN ) |g'
Original file line number Diff line number Diff line change @@ -85,6 +85,8 @@ sub evaluate_uri {
85
85
our $site_name = " ++GITWEB_SITENAME++"
86
86
|| ($ENV {' SERVER_NAME' } || " Untitled" ) . " Git" ;
87
87
88
+ # html snippet to include in the <head> section of each page
89
+ our $site_html_head_string = " ++GITWEB_SITE_HTML_HEAD_STRING++" ;
88
90
# filename of html text to include at top of each page
89
91
our $site_header = " ++GITWEB_SITE_HEADER++" ;
90
92
# html text to include at home page
@@ -3879,6 +3881,11 @@ sub git_header_html {
3879
3881
print " <base href=\" " .esc_url($base_url )." \" />\n " ;
3880
3882
}
3881
3883
print_header_links($status );
3884
+
3885
+ if (defined $site_html_head_string ) {
3886
+ print to_utf8($site_html_head_string );
3887
+ }
3888
+
3882
3889
print " </head>\n " .
3883
3890
" <body>\n " ;
3884
3891
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ our \$projectroot = "$safe_pwd";
16
16
our \$ project_maxdepth = 8;
17
17
our \$ home_link_str = 'projects';
18
18
our \$ site_name = '[localhost]';
19
+ our \$ site_html_head_string = '';
19
20
our \$ site_header = '';
20
21
our \$ site_footer = '';
21
22
our \$ home_text = 'indextext.html';
You can’t perform that action at this time.
0 commit comments