diff --git a/README.en.md b/README.en.md index 2b12f28..9a33f68 100644 --- a/README.en.md +++ b/README.en.md @@ -59,7 +59,7 @@ The config is TOML, read from the `CODEVIEW_CONFIG` environment variable, or `co | Section | Meaning | |---|---| -| `[[roots]]` | Where to scan. A `group`, plus exactly one of `path` (that directory is one repository) or `children` (every git repository directly under it). The order is the order of the left menu on the top page | +| `[[roots]]` | Where to scan. A `group`, plus exactly one of `path` (that directory is one repository) or `children` (every git repository directly under it). The order is the order of the groups in the left menu on the top page. Within a group, repositories with more files come first | | `[scan]` | `skip_dirs` (directory names not to scan), `exclude_prefixes` (path prefixes not to output), `skip_exts` (extensions not to output). To add exclusions for one repository, put `skip_exts` and `exclude_prefixes` in `[scan.repos.""]` (added to the global values; the slug is the repository's path in the output) | | `[[accounts]]` | The unit issues are grouped by; 1 or 2 of them. `name`, `hosts` (hosts of the `origin` remote), `groups` (the fallback when there is no remote), `issues` (the default `github`, or the module name of an extension that returns issues), `gh_config_dir` (the gh config dir used when `issues = "github"`) | | `[publish]` | The `remote` (default `origin`) and `branch` (default `deploy`) to publish to | diff --git a/README.md b/README.md index 99811c8..492e81a 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ codeview serve # http://localhost:8787 で確認する | 節 | 意味 | |---|---| -| `[[roots]]` | 走査する置き場。`group` と、`path`(そのディレクトリが1つのリポ)か `children`(直下の git リポすべて)のどちらか一方。並び順がトップの左メニューの順になる | +| `[[roots]]` | 走査する置き場。`group` と、`path`(そのディレクトリが1つのリポ)か `children`(直下の git リポすべて)のどちらか一方。並び順がトップの左メニューのグループの順になる。グループの中は、ファイル数の多いリポから並ぶ | | `[scan]` | `skip_dirs`(走査しないディレクトリ名)・`exclude_prefixes`(出力しないパスの接頭辞)・`skip_exts`(出力しない拡張子)。リポごとに足すときは `[scan.repos.""]` に `skip_exts` と `exclude_prefixes` を書く(全体の値に足される。slug はページのパスと同じ) | | `[[accounts]]` | Issue をまとめる単位で、1〜2個。`name`・`hosts`(`origin` の remote のホスト)・`groups`(remote が無いときの決め手)・`issues`(既定の `github` か、Issue を返す拡張のモジュール名)・`gh_config_dir`(`issues = "github"` のときに使う gh の config dir) | | `[publish]` | 配信先の `remote`(既定 `origin`)と `branch`(既定 `deploy`) | diff --git a/codeview/layout.py b/codeview/layout.py index 274cdcd..d80e9f1 100644 --- a/codeview/layout.py +++ b/codeview/layout.py @@ -282,7 +282,7 @@ def index_side(counts, board, extra: str = "") -> str: f'' f'{html.escape(name)}' f'{n:,}' - for slug, name, n in items + for slug, name, n in sorted(items, key=lambda it: (-it[2], it[1].lower())) ) blocks.append(f'

{html.escape(group)}

{rows}') return side_head("") + '
' + "".join(blocks) + "
"