mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 22:50:17 +00:00
Sort items alphabetically by name, with directories first
This commit is contained in:
@@ -210,6 +210,7 @@ def process_directory(full_path: pathlib.Path) -> Tuple[List[FileInfo], Optional
|
||||
)
|
||||
all_items.append(item_data)
|
||||
|
||||
# Sort items alphabetically by name, with directories first
|
||||
all_items.sort(key=lambda x: (not x.is_dir, x.name.lower()))
|
||||
|
||||
index_file = full_path / "index.md"
|
||||
|
||||
Reference in New Issue
Block a user