Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Name the page first in every title
Summary, about, log, refs, tag and stats pages shared one title, so
tabs, history and search results could not tell them apart. Titles now
read page, repository and site, with root-title as the site, and the
description stays in the meta description, where search engines read
it.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/t0005-markup.sh | 15 | |
| -rwxr-xr-x | tests/t0113-tag.sh | 5 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/t0005-markup.sh b/tests/t0005-markup.sh index 22ac81c..52d9e34 100755 --- a/tests/t0005-markup.sh +++ b/tests/t0005-markup.sh @@ -90,6 +90,21 @@ test_expect_success 'the blob, blame and about pages open with their own contain grep "<div id=.about.>" tmp ' +test_expect_success 'each page names itself, then the repository and the site' ' + site="Git repository browser" && + hooks "hooks/" >tmp && + grep "<title>hooks - $site</title>" tmp && + for page in about log refs tree stats + do + hooks "hooks/$page/" >tmp && + grep "<title>$page - hooks - $site</title>" tmp || return 1 + done && + hooks "hooks/tree/dir/hello.c" >tmp && + grep "<title>hello.c < dir - hooks - $site</title>" tmp && + hooks "hooks/blame/dir/hello.c" >tmp && + grep "<title>blame - hello.c < dir - hooks - $site</title>" tmp +' + # A browser gives these elements a monospace font of its own, which would # otherwise win over the one a theme sets through --font-mono. test_expect_success 'every monospace element takes the theme font' ' diff --git a/tests/t0113-tag.sh b/tests/t0113-tag.sh index b91c7e6..2043385 100755 --- a/tests/t0113-tag.sh +++ b/tests/t0113-tag.sh @@ -86,4 +86,9 @@ test_expect_success 'a signed tag shows its signature in the message' ' ! grep "<details" tmp ' +test_expect_success 'a tag page names the tag in its title' ' + cgit_url "foo/tag/&h=v1.0" >tmp && + grep "<title>v1.0 - foo - Git repository browser</title>" tmp +' + test_done |
