* [PATCH] gitweb: Do not automatically append " git" to custom site name
@ 2006-10-11 20:22 Petr Baudis
2006-10-11 20:31 ` Jakub Narebski
2006-10-11 22:06 ` Jeff King
0 siblings, 2 replies; 4+ messages in thread
From: Petr Baudis @ 2006-10-11 20:22 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
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 <pasky@suse.cz>
---
gitweb/gitweb.perl | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index c2dfdab..d165fdc 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -39,7 +39,7 @@ our $home_link_str = "++GITWEB_HOME_LINK
# 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'} Git" || "Untitled Git";
# filename of html text to include at top of each page
our $site_header = "++GITWEB_SITE_HEADER++";
@@ -1455,7 +1455,7 @@ sub git_header_html {
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) {
@@ -3842,7 +3842,7 @@ sub git_opml {
<?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">
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gitweb: Do not automatically append " git" to custom site name
2006-10-11 20:22 [PATCH] gitweb: Do not automatically append " git" to custom site name Petr Baudis
@ 2006-10-11 20:31 ` Jakub Narebski
2006-10-11 22:06 ` Jeff King
1 sibling, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2006-10-11 20:31 UTC (permalink / raw)
To: git
Petr Baudis wrote:
> +our $site_name = "++GITWEB_SITENAME++" || "$ENV{'SERVER_NAME'} Git" || "Untitled Git";
I'd use perhaps "[$ENV{'SERVER_NAME'}] Git".
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gitweb: Do not automatically append " git" to custom site name
2006-10-11 20:22 [PATCH] gitweb: Do not automatically append " git" to custom site name Petr Baudis
2006-10-11 20:31 ` Jakub Narebski
@ 2006-10-11 22:06 ` Jeff King
2006-10-24 3:18 ` Petr Baudis
1 sibling, 1 reply; 4+ messages in thread
From: Jeff King @ 2006-10-11 22:06 UTC (permalink / raw)
To: Petr Baudis; +Cc: Junio C Hamano, git
On Wed, Oct 11, 2006 at 10:22:28PM +0200, Petr Baudis wrote:
> +our $site_name = "++GITWEB_SITENAME++" || "$ENV{'SERVER_NAME'} Git" || "Untitled Git";
This will never show "Untitled" (instead it shows " Git") and will cause
a perl warning if $ENV{SERVER_NAME} is not defined and warnings are
enabled (which tye are in gitweb).
I think this is what you want:
our $site_name = "++GITWEB_SITENAME++" ||
($ENV{SERVER_NAME} || "Untitled") . " Git";
-Peff
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] gitweb: Do not automatically append " git" to custom site name
2006-10-11 22:06 ` Jeff King
@ 2006-10-24 3:18 ` Petr Baudis
0 siblings, 0 replies; 4+ messages in thread
From: Petr Baudis @ 2006-10-24 3:18 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
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 <pasky@suse.cz>
---
gitweb/gitweb.perl | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e77fc11..1e80f43 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -39,7 +39,8 @@ our $home_link_str = "++GITWEB_HOME_LINK
# 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++";
@@ -1433,7 +1434,7 @@ sub git_header_html {
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) {
@@ -3847,7 +3848,7 @@ sub git_opml {
<?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">
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-24 3:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11 20:22 [PATCH] gitweb: Do not automatically append " git" to custom site name Petr Baudis
2006-10-11 20:31 ` Jakub Narebski
2006-10-11 22:06 ` Jeff King
2006-10-24 3:18 ` Petr Baudis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).