git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: Include a site name in page titles

From
Alp Toker <alp@atoker.com>
Date
Jul 11, 2006, 10:19 UTC
Message-ID
<1152613179634-git-send-email-alp@atoker.com>
In-Reply-To
<11526131781900-git-send-email-alp@atoker.com>
Tip Of The Day:
    <title>: the most important element of a quality Web page.

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.

Signed-off-by: Alp Toker <alp@atoker.com>
---
 gitweb/gitweb.cgi |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/gitweb/gitweb.cgi b/gitweb/gitweb.cgi
index bd9b9de..b12417b 100755
--- a/gitweb/gitweb.cgi
+++ b/gitweb/gitweb.cgi
@@ -46,6 +46,9 @@ 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
+our $site_name = "Untitled";
+
 # html text to include at home page
 our $home_text = "indextext.html";
 
@@ -280,7 +283,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 +1773,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";
-- 
1.4.1.g97c7-dirty
Previous: Alp TokerNext: Alp Toker
Message 3 of 17 in “Typo fix”
  1. Typo fixAlp Toker, Jul 11, 2006
  2. gitweb: Send XHTML as 'application/xhtml+xml' where possibleAlp Toker, Jul 11, 2006
  3. gitweb: Include a site name in page titlesAlp Toker, Jul 11, 2006
  4. gitweb: Use the git binary in the search path by defaultAlp Toker, Jul 11, 2006
  5. git-send-email: Remove redundant Reply-To headerAlp Toker, Jul 11, 2006
  6. Install built-ins as symlinksAlp Toker, Jul 11, 2006
  7. Andreas EricssonJul 11, 2006
  8. Johannes SchindelinJul 11, 2006
  9. Alp TokerJul 11, 2006
  10. Johannes SchindelinJul 11, 2006
  11. Petr BaudisJul 11, 2006
  12. Alex RiesenJul 12, 2006
  13. Petr BaudisJul 11, 2006
  14. Junio C HamanoJul 11, 2006
  15. Martin LanghoffJul 11, 2006
  16. Junio C HamanoJul 11, 2006
  17. Pavel RoskinJul 11, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.