From 0b192692a3108ca9def1f462aa5bb2489fa87690 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 5 May 2026 10:18:05 +0200 Subject: fix: use lowercase article types and restore selection in FrontmatterEditor ARTICLE_TYPES lowercased to match Hugo theme expectations. FrontmatterEditor now matches the existing frontmatter value case-insensitively so the correct type is selected rather than defaulting to the first item. Co-Authored-By: Claude Sonnet 4.6 --- ui/frontmatter_editor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/frontmatter_editor.py') diff --git a/ui/frontmatter_editor.py b/ui/frontmatter_editor.py index 160536e..add9a41 100644 --- a/ui/frontmatter_editor.py +++ b/ui/frontmatter_editor.py @@ -75,8 +75,9 @@ class FrontmatterEditor(QDialog): if key == "type": widget = QComboBox() widget.addItems(ARTICLE_TYPES) - if str(val) in ARTICLE_TYPES: - widget.setCurrentText(str(val)) + val_lower = str(val).lower() + if val_lower in ARTICLE_TYPES: + widget.setCurrentText(val_lower) self._fields[key] = widget elif key == "tags": widget = QLineEdit(", ".join(str(v) for v in val) if isinstance(val, list) else str(val)) -- cgit v1.2.3