diff --git a/README.md b/README.md index 0562cee..c47f14a 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,17 @@ https://gitea.seamtro.ai/leora/gitea-selfhost. Run the kit tests (above) first. ## Optional: list `.profile` repos last -`config/custom/templates/explore/repo_list.tmpl` overrides Gitea 1.23.x's repo list so that -`.profile` contact-card repos render after the other repos on each page (explore, user and org -pages). Copy it to `$GITEA_CUSTOM/templates/explore/` and restart Gitea. The reorder is per page, -so it is exact while all repos fit on one page (`[ui] EXPLORE_PAGING_NUM`, default 20). +`config/custom/templates/explore/repo_list.tmpl` (plus `repo_list_item.tmpl`, the shared row markup) +overrides Gitea 1.23.x's repo list so `.profile` contact-card repos (any case) render after the +other repos. The same list template is used by explore, user and org repo tabs, and the +starred / watched views, so they all get this order; admin repo management uses its own template +and is unchanged. + +To install, copy both files to `$GITEA_CUSTOM/templates/explore/` and restart Gitea. + +The reorder happens within each page. To keep whole lists in order, `config/app.ini.template` +sets `[ui] EXPLORE_PAGING_NUM = 100` and `[ui.user] REPO_PAGING_NUM = 100` (defaults are 20 and 15). +If an instance grows past 100 repos, raise these settings. + +On every Gitea upgrade, diff `templates/explore/repo_list.tmpl` in the new version against these +files and port any changes. Gitea refuses to start when a template has an error. diff --git a/config/app.ini.template b/config/app.ini.template index f74c9cf..e627f49 100644 --- a/config/app.ini.template +++ b/config/app.ini.template @@ -97,3 +97,10 @@ LEVEL = Info [other] SHOW_FOOTER_VERSION = false SHOW_FOOTER_TEMPLATE_LOAD_TIME = false + +; Large pages so the .profile-last template override orders whole lists, not just one page +[ui] +EXPLORE_PAGING_NUM = 100 + +[ui.user] +REPO_PAGING_NUM = 100 diff --git a/config/custom/templates/explore/repo_list.tmpl b/config/custom/templates/explore/repo_list.tmpl index 826b267..7207761 100644 --- a/config/custom/templates/explore/repo_list.tmpl +++ b/config/custom/templates/explore/repo_list.tmpl @@ -1,135 +1,7 @@