Skip to content

Commit 14d8207

Browse files
Add new app.ini setting for whether to search within repo description.
Signed-off-by: David Svantesson <[email protected]>
1 parent c03820c commit 14d8207

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

custom/conf/app.ini.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ DEFAULT_THEME = gitea
116116
THEMES = gitea,arc-green
117117
; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
118118
DEFAULT_SHOW_FULL_NAME = false
119+
; Whether to search within description at repository search on explore page.
120+
SEARCH_REPO_DESCRIPTION = false
119121

120122
[ui.admin]
121123
; Number of users that are displayed on one page

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
9696
- `THEMES`: **gitea,arc-green**: All available themes. Allow users select personalized themes
9797
regardless of the value of `DEFAULT_THEME`.
9898
- `DEFAULT_SHOW_FULL_NAME`: false: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
99+
- `SEARCH_REPO_DESCRIPTION`: false: Whether to search within description at repository search on explore page.
99100

100101
### UI - Admin (`ui.admin`)
101102

modules/setting/setting.go

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,20 @@ var (
160160

161161
// UI settings
162162
UI = struct {
163-
ExplorePagingNum int
164-
IssuePagingNum int
165-
RepoSearchPagingNum int
166-
FeedMaxCommitNum int
167-
GraphMaxCommitNum int
168-
CodeCommentLines int
169-
ReactionMaxUserNum int
170-
ThemeColorMetaTag string
171-
MaxDisplayFileSize int64
172-
ShowUserEmail bool
173-
DefaultShowFullName bool
174-
DefaultTheme string
175-
Themes []string
163+
ExplorePagingNum int
164+
IssuePagingNum int
165+
RepoSearchPagingNum int
166+
FeedMaxCommitNum int
167+
GraphMaxCommitNum int
168+
CodeCommentLines int
169+
ReactionMaxUserNum int
170+
ThemeColorMetaTag string
171+
MaxDisplayFileSize int64
172+
ShowUserEmail bool
173+
DefaultShowFullName bool
174+
DefaultTheme string
175+
Themes []string
176+
SearchRepoDescription bool
176177

177178
Admin struct {
178179
UserPagingNum int
@@ -953,6 +954,7 @@ func NewContext() {
953954

954955
UI.ShowUserEmail = Cfg.Section("ui").Key("SHOW_USER_EMAIL").MustBool(true)
955956
UI.DefaultShowFullName = Cfg.Section("ui").Key("DEFAULT_SHOW_FULL_NAME").MustBool(false)
957+
UI.SearchRepoDescription = Cfg.Section("ui").Key("SEARCH_REPO_DESCRIPTION").MustBool(false)
956958

957959
HasRobotsTxt = com.IsFile(path.Join(CustomPath, "robots.txt"))
958960

0 commit comments

Comments
 (0)