views/blob: suppress double-slash in page title
For blobs in subdirectories, the page title always includes a double slash between the final directory component and the filename (for example, "git >> repo >> branch >> doc//readme.txt"). This is unsightly. git-arr:blob() ensures that the directory passed to views/blob always has a trailing slash, so we can drop the slash inserted by views/blob between the directory and the filename. As a side-effect, this also changes the page title for blobs in the root directory. Instead of "git >> repo >> branch >> /readme.txt", the title becomes "git >> repo >> branch >> readme.txt", which is slightly more aesthetically pleasing. Signed-off-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>
This commit is contained in:
parent
5568fd50c2
commit
84d628c690
@ -11,7 +11,7 @@
|
|||||||
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
|
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
|
||||||
|
|
||||||
<title>git » {{repo.name}} »
|
<title>git » {{repo.name}} »
|
||||||
{{branch}} » {{dirname.unicode}}/{{fname.unicode}}</title>
|
{{branch}} » {{dirname.unicode}}{{fname.unicode}}</title>
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" type="text/css"
|
||||||
href="{{relroot}}../../../../../static/git-arr.css"/>
|
href="{{relroot}}../../../../../static/git-arr.css"/>
|
||||||
<link rel="stylesheet" type="text/css"
|
<link rel="stylesheet" type="text/css"
|
||||||
|
Loading…
Reference in New Issue
Block a user