More discriminant page title when browsing repository #1146

Closed
opened 2025-11-02 03:50:01 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @ypnos on GitHub (Oct 13, 2017).

This is a feature request to improve the page title (<title>, seen in browser tab and history) when browsing a repository. The current page title is composed of the repository name and its description. It does not tell where in the repository you are currently are.

In comparison, in the wiki, the page title is just the name of the wiki page (e.g. 'Home').

I would suggest to replace the description of the repository with the path within that repository (eg. '/README.md'.
I don't really see the description as a good choice for the page title in general.

Originally created by @ypnos on GitHub (Oct 13, 2017). - Gitea version (or commit ref): 1.2.0 - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/hans/w00t/src/master/README.md This is a feature request to improve the page title (`<title>`, seen in browser tab and history) when browsing a repository. The current page title is composed of the repository name and its description. It does not tell where in the repository you are currently are. In comparison, in the wiki, the page title is just the name of the wiki page (e.g. 'Home'). I would suggest to replace the description of the repository with the path within that repository (eg. '/README.md'. I don't really see the description as a good choice for the page title in general.
GiteaMirror added the type/enhancementissue/stale labels 2025-11-02 03:50:01 -06:00
Author
Owner

@lunny commented on GitHub (Oct 13, 2017):

I think the path is right of the drop down menus of branches?

@lunny commented on GitHub (Oct 13, 2017): I think the path is right of the drop down menus of branches?
Author
Owner

@ypnos commented on GitHub (Oct 13, 2017):

I am sorry for the confusion. I am talking about the <title> tag of the page. So the text you see in the tab, taskbar, browser history.

In github for example:

It would be great if in the second case we would get a title similar to github.

@ypnos commented on GitHub (Oct 13, 2017): I am sorry for the confusion. I am talking about the **`<title>` tag** of the page. So the text you see in the tab, taskbar, browser history. In github for example: - https://github.com/go-gitea/gitea → 'go-gitea/gitea: Gitea: Git with a cup of tea' - https://github.com/go-gitea/gitea/tree/master/conf → 'gitea/conf at master · go-gitea/gitea' It would be great if in the second case we would get a title similar to github.
Author
Owner

@bkcsoft commented on GitHub (Oct 15, 2017):

Easy enough to just inject .Title in the controller. Templates already have support for it :)
32ca299650/templates/base/head.tmpl (L6)
Adding it here would suffice for the second example:
32ca299650/routers/repo/view.go (L147-L150)

@bkcsoft commented on GitHub (Oct 15, 2017): Easy enough to just inject `.Title` in the controller. Templates already have support for it :) https://github.com/go-gitea/gitea/blob/32ca299650277829b93994eca1508f9d84a5b667/templates/base/head.tmpl#L6 Adding it here would suffice for the second example: https://github.com/go-gitea/gitea/blob/32ca299650277829b93994eca1508f9d84a5b667/routers/repo/view.go#L147-L150
Author
Owner

@stale[bot] commented on GitHub (Feb 12, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 12, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 26, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 26, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1146