From 7e8c5930ef1bc9d7b82a7ac3fe1e43fdff90a824 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Thu, 30 Mar 2023 22:09:22 +0800 Subject: [PATCH] Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766) (#23791) Follow #21962 After I eat my own dogfood, I would say that ONLY_SHOW_RELEVANT_REPOS=false is necessary for many private/enterprise instances, because many private repositories do not have "description/topic", users just want to search by their names. This PR also adds `PageIsExploreRepositories` check, to make code more strict, because the `search` template is shared for different purpose. And during the test, I found a bug that the "Search" button didn't respect the "relevant" parameter, so this PR fixes the bug by the way together. --- doc/administration/config-cheat-sheet.en-us.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/administration/config-cheat-sheet.en-us.md b/doc/administration/config-cheat-sheet.en-us.md index 95272378..4ef930cd 100644 --- a/doc/administration/config-cheat-sheet.en-us.md +++ b/doc/administration/config-cheat-sheet.en-us.md @@ -226,11 +226,13 @@ The following configuration set `Content-Type: application/vnd.android.package-a Values can be emoji alias (:smile:) or a unicode emoji. For custom reactions, add a tightly cropped square image to public/img/emoji/reaction_name.png - `CUSTOM_EMOJIS`: **gitea, codeberg, gitlab, git, github, gogs**: Additional Emojis not defined in the utf8 standard. - By default we support Gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and + By default, we support Gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and add it to this config. - `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. - `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page. - `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets. +- `ONLY_SHOW_RELEVANT_REPOS`: **false** Whether to only show relevant repos on the explore page when no keyword is specified and default sorting is used. + A repo is considered irrelevant if it's a fork or if it has no metadata (no description, no icon, no topic). ### UI - Admin (`ui.admin`)