]> Lady’s Gitweb - Gitweb/commitdiff
gitweb: Do not automatically append " git" to custom site name
authorPetr Baudis <redacted>
Tue, 24 Oct 2006 03:18:39 +0000 (05:18 +0200)
committerLady <redacted>
Mon, 6 Apr 2026 04:07:11 +0000 (00:07 -0400)
If you customized the site name, you probably do not want the " git"
appended so that the page title is not bastardized; I want repo.or.cz pages
titled "Public Git Hosting", not "Public Git Hosting git" (what's hosting
what?).

This slightly changes the $site_name semantics but only very
insignificantly.

Signed-off-by: Petr Baudis <redacted>
Signed-off-by: Junio C Hamano <redacted>
gitweb.perl

index 211223b2439f06d3c5ebdc22ede8ebeeddf7543a7abef9995b3cddfe7510cfb9..99bf9301e951a3aefa337ea6927bb73ed4d404fc06b2b374c88a8e18e34de1ee 100755 (executable)
@@ -39,7 +39,8 @@ our $home_link_str = "++GITWEB_HOME_LINK_STR++";
 
 # name of your site or organization to appear in page titles
 # replace this with something more descriptive for clearer bookmarks
 
 # name of your site or organization to appear in page titles
 # replace this with something more descriptive for clearer bookmarks
-our $site_name = "++GITWEB_SITENAME++" || $ENV{'SERVER_NAME'} || "Untitled";
+our $site_name = "++GITWEB_SITENAME++"
+                 || ($ENV{'SERVER_NAME'} || "Untitled") . " Git";
 
 # filename of html text to include at top of each page
 our $site_header = "++GITWEB_SITE_HEADER++";
 
 # filename of html text to include at top of each page
 our $site_header = "++GITWEB_SITE_HEADER++";
@@ -1430,7 +1431,7 @@ sub git_header_html {
        my $status = shift || "200 OK";
        my $expires = shift;
 
        my $status = shift || "200 OK";
        my $expires = shift;
 
-       my $title = "$site_name git";
+       my $title = "$site_name";
        if (defined $project) {
                $title .= " - $project";
                if (defined $action) {
        if (defined $project) {
                $title .= " - $project";
                if (defined $action) {
@@ -3839,7 +3840,7 @@ sub git_opml {
 <?xml version="1.0" encoding="utf-8"?>
 <opml version="1.0">
 <head>
 <?xml version="1.0" encoding="utf-8"?>
 <opml version="1.0">
 <head>
-  <title>$site_name Git OPML Export</title>
+  <title>$site_name OPML Export</title>
 </head>
 <body>
 <outline text="git RSS feeds">
 </head>
 <body>
 <outline text="git RSS feeds">
This page took 0.276672 seconds and 4 git commands to generate.