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

[PATCH 3/3 (take 2)] gitweb: Add link to "project_index" view to "project_list" page

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 15, 2006, 09:11 UTC
Message-ID
<200609151111.33942.jnareb@gmail.com>
In-Reply-To
<200609150459.27708.jnareb@gmail.com>

Add link to "project_index" view as [TXT] beside link to "opml" view, (which is marked by [OPML]) to "project_list" page.

While at it add alternate links for "opml" and "project_list" to HTML header for "project_list" view.

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Corrected alternate links (dumb error while copy'n'paste).
 gitweb/gitweb.perl |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index e900713..3079531 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1255,6 +1255,13 @@ EOF
 		printf('<link rel="alternate" title="%s log" '.
 		       'href="%s" type="application/rss+xml"/>'."\n",
 		       esc_param($project), href(action=>"rss"));
+	} else {
+		printf('<link rel="alternate" title="%s projects list" '.
+		       'href="%s" type="text/plain; charset=utf-8"/>'."\n",
+		       $site_name, href(project=>undef, action=>"project_index"));
+		printf('<link rel="alternate" title="%s projects logs" '.
+		       'href="%s" type="text/x-opml"/>'."\n",
+		       $site_name, href(project=>undef, action=>"opml"));
 	}
 	if (defined $favicon) {
 		print qq(<link rel="shortcut icon" href="$favicon" type="image/png"/>\n);
@@ -1309,7 +1316,9 @@ sub git_footer_html {
 		              -class => "rss_logo"}, "RSS") . "\n";
 	} else {
 		print $cgi->a({-href => href(project=>undef, action=>"opml"),
-		              -class => "rss_logo"}, "OPML") . "\n";
+		              -class => "rss_logo"}, "OPML") . " ";
+		print $cgi->a({-href => href(project=>undef, action=>"project_index"),
+		              -class => "rss_logo"}, "TXT") . "\n";
 	}
 	print "</div>\n" .
 	      "</body>\n" .
-- 
1.4.2
Previous: Jakub NarebskiNext: Jakub Narebski
Message 7 of 8 in “Add git_project_index, improve href()”
  1. 0/3 Add git_project_index, improve href()Jakub Narebski, Sep 15, 2006
  2. 1/3 gitweb: Add git_project_index for generating index.auxJakub Narebski, Sep 15, 2006
  3. 2/3 gitweb: Allow for href() to be used for projectless linksJakub Narebski, Sep 15, 2006
  4. Junio C HamanoSep 15, 2006
  5. Jakub NarebskiSep 15, 2006
  6. 3/3 gitweb: Add link to "project_index" view to "project_list" pageJakub Narebski, Sep 15, 2006
  7. 3/3 gitweb: Add link to "project_index" view to "project_list" pageJakub Narebski, Sep 15, 2006
  8. 2/3 gitweb: Allow for href() to be used for links without project paramJakub Narebski, Sep 15, 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.