diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-08-25 20:38:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 20:38:41 +0200 |
commit | 27ac65a124f34ec3ed5f34aeb576f918ae1c70b1 (patch) | |
tree | 2c31f4d30e5bfce87056c397fcdae6c6e86c5788 /modules | |
parent | dc0253b0637bbf367ad330612900e780c6b2b0e6 (diff) | |
download | gitea-27ac65a124f34ec3ed5f34aeb576f918ae1c70b1.tar.gz gitea-27ac65a124f34ec3ed5f34aeb576f918ae1c70b1.zip |
Only show relevant repositories on explore page (#19361)
Adds a new option to only show relevant repo's on the explore page, for bigger Gitea instances like Codeberg this is a nice option to enable to make the explore page more populated with unique and "high" quality repo's. A note is shown that the results are filtered and have the possibility to see the unfiltered results.
Co-authored-by: vednoc <vednoc@protonmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index becd52f011..09e510ffa0 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -240,6 +240,7 @@ var ( CustomEmojisMap map[string]string `ini:"-"` SearchRepoDescription bool UseServiceWorker bool + OnlyShowRelevantRepos bool Notification struct { MinTimeout time.Duration @@ -1087,6 +1088,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) { UI.DefaultShowFullName = Cfg.Section("ui").Key("DEFAULT_SHOW_FULL_NAME").MustBool(false) UI.SearchRepoDescription = Cfg.Section("ui").Key("SEARCH_REPO_DESCRIPTION").MustBool(true) UI.UseServiceWorker = Cfg.Section("ui").Key("USE_SERVICE_WORKER").MustBool(false) + UI.OnlyShowRelevantRepos = Cfg.Section("ui").Key("ONLY_SHOW_RELEVANT_REPOS").MustBool(false) HasRobotsTxt, err = util.IsFile(path.Join(CustomPath, "robots.txt")) if err != nil { |