summaryrefslogtreecommitdiff
path: root/gitweb
diff options
context:
space:
mode:
authorAlp Toker <alp@atoker.com>2006-07-11 20:10:26 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-07-11 21:18:42 (GMT)
commit49da1dafc075e353c0eb3869de4acf600c594621 (patch)
tree53d0123e5c0bf3f0862888ef5231c66a45a69e2d /gitweb
parentf6801d669ee11f0d5e67b2e86aec270d2a225224 (diff)
downloadgit-49da1dafc075e353c0eb3869de4acf600c594621.zip
git-49da1dafc075e353c0eb3869de4acf600c594621.tar.gz
git-49da1dafc075e353c0eb3869de4acf600c594621.tar.bz2
gitweb: Include a site name in page titles
This helps users tell one 'git' bookmark apart from the other in their browser and improves the indexing of gitweb sites in Web search engines. The title defaults to the SERVER_NAME environment variable, often given by the webserver. Signed-off-by: Alp Toker <alp@atoker.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'gitweb')
-rwxr-xr-xgitweb/gitweb.cgi8
1 files changed, 6 insertions, 2 deletions
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index bd9b9de..3d9fa44 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -46,6 +46,10 @@ if (! -d $git_temp) {
# target of the home link on top of all pages
our $home_link = $my_uri;
+# name of your site or organization to appear in page titles
+# replace this with something more descriptive for clearer bookmarks
+our $site_name = $ENV{'SERVER_NAME'} || "Untitled";
+
# html text to include at home page
our $home_text = "indextext.html";
@@ -280,7 +284,7 @@ sub git_header_html {
my $status = shift || "200 OK";
my $expires = shift;
- my $title = "git";
+ my $title = "$site_name git";
if (defined $project) {
$title .= " - $project";
if (defined $action) {
@@ -1770,7 +1774,7 @@ sub git_opml {
print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n".
"<opml version=\"1.0\">\n".
"<head>".
- " <title>Git OPML Export</title>\n".
+ " <title>$site_name Git OPML Export</title>\n".
"</head>\n".
"<body>\n".
"<outline text=\"git RSS feeds\">\n";