gitweb: Enhance page title
cover gitweb: Enhance page title
This series of patches adds filename (with '/' at the end added for trees, i.e. directories) to the page title, for easier bookmarking and viewing browser history.
On top of 'next', but should apply cleanly for 'master' too.
PATCH 1/2 gitweb: Add filename to page title if set
---
gitweb/gitweb.cgi | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
a54751bb328072baed5446bdc4076f1e00002737
gitweb/gitweb.cgi +3 -0
@@ -260,7 +260,10 @@ sub git_header_html { if (defined $project) { $title .= " - $project"; if (defined $action) { + if (defined $file_name) { + $title .= " - $file_name"; + } } } print $cgi->header(-type=>'text/html', -charset => 'utf-8', -status=> $status, -expires => $expires);
Signature · 1 line
1.3.0
PATCH 1/2 gitweb: add '/' to the end of filename in page title for trees
In reply to Jakub Narebski---
gitweb/gitweb.cgi | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
d17c119d32ae4c5dd50976ea6a255d2bcbe480ed
gitweb/gitweb.cgi +3 -0
@@ -263,6 +263,9 @@ sub git_header_html { $title .= "/$action"; if (defined $file_name) { $title .= " - $file_name"; + if ($action eq "tree" && $file_name !~ m|/$|) { + $title .= "/"; + } } } }
Signature · 1 line
1.3.0
Re: [PATCH 1/2] gitweb: add '/' to the end of filename in page title for trees
This should of course be [PATCH 2/2]. I'm sorry for mistake.
Signature · 3 lines
Jakub Narebski Warsaw, Poland ShadeHawk on #git