Merge branch 'lh/gitweb-site-html-head'
* lh/gitweb-site-html-head: gitweb: provide a way to customize html headers
This commit is contained in:
commit
208a1cc3d3
@ -364,6 +364,11 @@ $site_name::
|
|||||||
+
|
+
|
||||||
Can be set using the `GITWEB_SITENAME` at build time. Unset by default.
|
Can be set using the `GITWEB_SITENAME` at build time. Unset by default.
|
||||||
|
|
||||||
|
$site_html_head_string::
|
||||||
|
HTML snippet to be included in the <head> section of each page.
|
||||||
|
Can be set using `GITWEB_SITE_HTML_HEAD_STRING` at build time.
|
||||||
|
No default value.
|
||||||
|
|
||||||
$site_header::
|
$site_header::
|
||||||
Name of a file with HTML to be included at the top of each page.
|
Name of a file with HTML to be included at the top of each page.
|
||||||
Relative to the directory containing the 'gitweb.cgi' script.
|
Relative to the directory containing the 'gitweb.cgi' script.
|
||||||
|
@ -130,6 +130,8 @@ You can specify the following configuration variables when building GIT:
|
|||||||
Points to an .html file which is included on the gitweb project
|
Points to an .html file which is included on the gitweb project
|
||||||
overview page ('projects_list' view), if it exists. Relative to
|
overview page ('projects_list' view), if it exists. Relative to
|
||||||
gitweb.cgi script. [Default: indextext.html]
|
gitweb.cgi script. [Default: indextext.html]
|
||||||
|
* GITWEB_SITE_HTML_HEAD_STRING
|
||||||
|
html snippet to include in the <head> section of each page. [No default]
|
||||||
* GITWEB_SITE_HEADER
|
* GITWEB_SITE_HEADER
|
||||||
Filename of html text to include at top of each page. Relative to
|
Filename of html text to include at top of each page. Relative to
|
||||||
gitweb.cgi script. [No default]
|
gitweb.cgi script. [No default]
|
||||||
|
@ -34,6 +34,7 @@ GITWEB_CSS = static/gitweb.css
|
|||||||
GITWEB_LOGO = static/git-logo.png
|
GITWEB_LOGO = static/git-logo.png
|
||||||
GITWEB_FAVICON = static/git-favicon.png
|
GITWEB_FAVICON = static/git-favicon.png
|
||||||
GITWEB_JS = static/gitweb.js
|
GITWEB_JS = static/gitweb.js
|
||||||
|
GITWEB_SITE_HTML_HEAD_STRING =
|
||||||
GITWEB_SITE_HEADER =
|
GITWEB_SITE_HEADER =
|
||||||
GITWEB_SITE_FOOTER =
|
GITWEB_SITE_FOOTER =
|
||||||
HIGHLIGHT_BIN = highlight
|
HIGHLIGHT_BIN = highlight
|
||||||
@ -144,6 +145,7 @@ GITWEB_REPLACE = \
|
|||||||
-e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
|
-e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \
|
||||||
-e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
|
-e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \
|
||||||
-e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
|
-e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \
|
||||||
|
-e 's|++GITWEB_SITE_HTML_HEAD_STRING++|$(GITWEB_SITE_HTML_HEAD_STRING)|g' \
|
||||||
-e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
|
-e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \
|
||||||
-e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
|
-e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \
|
||||||
-e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN)|g'
|
-e 's|++HIGHLIGHT_BIN++|$(HIGHLIGHT_BIN)|g'
|
||||||
|
@ -85,6 +85,8 @@ our $home_link_str = "++GITWEB_HOME_LINK_STR++";
|
|||||||
our $site_name = "++GITWEB_SITENAME++"
|
our $site_name = "++GITWEB_SITENAME++"
|
||||||
|| ($ENV{'SERVER_NAME'} || "Untitled") . " Git";
|
|| ($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
|
# filename of html text to include at top of each page
|
||||||
our $site_header = "++GITWEB_SITE_HEADER++";
|
our $site_header = "++GITWEB_SITE_HEADER++";
|
||||||
# html text to include at home page
|
# html text to include at home page
|
||||||
@ -3879,6 +3881,11 @@ EOF
|
|||||||
print "<base href=\"".esc_url($base_url)."\" />\n";
|
print "<base href=\"".esc_url($base_url)."\" />\n";
|
||||||
}
|
}
|
||||||
print_header_links($status);
|
print_header_links($status);
|
||||||
|
|
||||||
|
if (defined $site_html_head_string) {
|
||||||
|
print to_utf8($site_html_head_string);
|
||||||
|
}
|
||||||
|
|
||||||
print "</head>\n" .
|
print "</head>\n" .
|
||||||
"<body>\n";
|
"<body>\n";
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ our \$projectroot = "$safe_pwd";
|
|||||||
our \$project_maxdepth = 8;
|
our \$project_maxdepth = 8;
|
||||||
our \$home_link_str = 'projects';
|
our \$home_link_str = 'projects';
|
||||||
our \$site_name = '[localhost]';
|
our \$site_name = '[localhost]';
|
||||||
|
our \$site_html_head_string = '';
|
||||||
our \$site_header = '';
|
our \$site_header = '';
|
||||||
our \$site_footer = '';
|
our \$site_footer = '';
|
||||||
our \$home_text = 'indextext.html';
|
our \$home_text = 'indextext.html';
|
||||||
|
Loading…
Reference in New Issue
Block a user