From 92035bd1fdb57429e80cd813295eb5ca81eac7eb Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 1 Oct 2025 20:17:00 -0400 Subject: [PATCH] Fix folder icon consistency by normalizing directory names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tuftecms/blueprints/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tuftecms/blueprints/api.py b/tuftecms/blueprints/api.py index 517e222..be27df3 100644 --- a/tuftecms/blueprints/api.py +++ b/tuftecms/blueprints/api.py @@ -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)