forgejo/routers/web/repo
Gusted d706d9e222
[GITEA] Improve HTML title on repositories
- The `<title>` element that lives inside the `<head>` element is an important element that gives browsers and search engine crawlers the title of the webpage, hence the element name. It's therefor important that this title is accurate.
- Currently there are three issues with titles on repositories. It doesn't use the `FullName` and instead only uses the repository name, this doesn't distinguish which user or organisation the repository is on. It doesn't show the full treepath in the title when visiting an file inside a directory and instead only uses the latest path in treepath. It can show the repository name twice if the `.Title` variable also included the repository name such as on the repository homepage.
- Use the repository's fullname (which include which user the repository is on) instead of just their name.
- Display the repository's fullname if it isn't already in `.Title`.
- Use the full treepath in the repository code view instead of just the
last path.
- Adds integration tests.
- Adds a new repository (`repo59`) that has 3 depths for folders, which
wasn't in any other fixture repository yet, so the full treepath for
could be properly tested.
- Resolves https://codeberg.org/forgejo/forgejo/issues/1276

(cherry picked from commit ff9a6a2cda)
(cherry picked from commit 76dffc8621)
(cherry picked from commit ff0615b9d0)
(cherry picked from commit 8712eaa394)
(cherry picked from commit 0c11587582)
(cherry picked from commit 3cbd9fb792)

Conflicts:
	tests/integration/repo_test.go
	https://codeberg.org/forgejo/forgejo/pulls/1512
(cherry picked from commit fbfdba8ae9)

Conflicts:
	models/fixtures/release.yml
	https://codeberg.org/forgejo/forgejo/pulls/1550
(cherry picked from commit 8b2bf0534c)
2023-10-09 20:25:23 +02:00
..
actions Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
setting [GITEA] Make confirmation clearer for dangerous actions 2023-10-09 19:11:03 +02:00
activity.go
attachment.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
blame.go Improve tree not found page (#26570) 2023-09-29 07:42:39 +00:00
branch.go Search branches (#27055) 2023-09-17 08:24:40 +00:00
cherry_pick.go
commit.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
compare.go When comparing with an non-exist repository, return 404 but 500 (#27437) 2023-10-04 13:59:03 +00:00
download.go
editor.go Improve tree not found page (#26570) 2023-09-29 07:42:39 +00:00
editor_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
find.go
helper.go Improve tree not found page (#26570) 2023-09-29 07:42:39 +00:00
helper_test.go Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
http.go More refactoring of db.DefaultContext (#27083) 2023-09-15 06:13:19 +00:00
http_test.go
issue.go Remove redundant len check around loop (#27464) 2023-10-06 14:49:37 +08:00
issue_content_history.go Improve issue history dialog and make poster can delete their own history (#27323) 2023-09-28 08:43:20 +00:00
issue_dependency.go
issue_label.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
issue_label_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
issue_lock.go
issue_pin.go
issue_stopwatch.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
issue_test.go
issue_timetrack.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
issue_watch.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
middlewares.go More refactoring of db.DefaultContext (#27083) 2023-09-15 06:13:19 +00:00
migrate.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
milestone.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
packages.go Fix the display of org level badges (#26504) 2023-09-06 14:38:14 +08:00
patch.go
projects.go More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
projects_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
pull.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
pull_review.go More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
release.go [GITEA] Allow release creation on commit 2023-10-09 20:25:23 +02:00
release_test.go Improvements of releases list and tags list (#25859) 2023-09-28 13:21:47 +00:00
render.go
repo.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
search.go
topic.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
treelist.go
view.go [GITEA] Improve HTML title on repositories 2023-10-09 20:25:23 +02:00
view_test.go
wiki.go Move notification interface to services layer (#26915) 2023-09-05 18:37:47 +00:00
wiki_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00