Add slogan config (#3752)
This is a PR for #3616 Currently added a new optional config `SLOGAN` in ini file. When this config is set title page is modified in APP_NAME [ - SLOGAN] Example in image below  Add the new config value in the admin settings page (readonly)  ## TODO * [x] Add the possibility to add the `SLOGAN` config from the installation form * [ ] Update https://forgejo.org/docs/next/admin/config-cheat-sheet Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3752 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Co-authored-by: mirko <mirko.perillo@gmail.com> Co-committed-by: mirko <mirko.perillo@gmail.com>
This commit is contained in:
parent
dedcd6c647
commit
f015846c11
19 changed files with 138 additions and 13 deletions
|
@ -185,3 +185,28 @@ func TestInHistoryButton(t *testing.T) {
|
|||
})
|
||||
})
|
||||
}
|
||||
|
||||
func TestTitleDisplayName(t *testing.T) {
|
||||
session := emptyTestSession(t)
|
||||
title := GetHTMLTitle(t, session, "/")
|
||||
assert.Equal(t, "Gitea: Git with a cup of tea", title)
|
||||
}
|
||||
|
||||
func TestHomeDisplayName(t *testing.T) {
|
||||
session := emptyTestSession(t)
|
||||
req := NewRequest(t, "GET", "/")
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
assert.Equal(t, "Gitea: Git with a cup of tea", strings.TrimSpace(htmlDoc.Find("h1.title").Text()))
|
||||
}
|
||||
|
||||
func TestOpenGraphDisplayName(t *testing.T) {
|
||||
session := emptyTestSession(t)
|
||||
req := NewRequest(t, "GET", "/")
|
||||
resp := session.MakeRequest(t, req, http.StatusOK)
|
||||
htmlDoc := NewHTMLParser(t, resp.Body)
|
||||
ogTitle, _ := htmlDoc.Find("meta[property='og:title']").Attr("content")
|
||||
assert.Equal(t, "Gitea: Git with a cup of tea", ogTitle)
|
||||
ogSiteName, _ := htmlDoc.Find("meta[property='og:site_name']").Attr("content")
|
||||
assert.Equal(t, "Gitea: Git with a cup of tea", ogSiteName)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue