mirror of
https://github.com/kennethreitz/kennethreitz.org.git
synced 2026-06-05 22:50:17 +00:00
Fix folder icon consistency by normalizing directory names
Capitalize and format folder names consistently (e.g., "photography" -> "Photography") when no index.md exists, ensuring the same icon color appears in both the browse dropdown and on the directory page itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -264,7 +264,7 @@ def directory_tree():
|
||||
|
||||
if item.is_dir():
|
||||
# For folders, try to get title from index.md
|
||||
display_name = item.name
|
||||
display_name = item.name.replace("-", " ").replace("_", " ").title()
|
||||
index_file = item / 'index.md'
|
||||
if index_file.exists():
|
||||
title = get_cached_markdown_title(index_file)
|
||||
|
||||
Reference in New Issue
Block a user