bugfix: draft articles required a category

Draft articles seemed to unintentionally have 'category' as a
required metadata key. I have made them optional, just like
non-draft articles.
This commit is contained in:
Eklavya Sharma 2026-05-07 19:38:11 -05:00
commit 459c41b9d6

View file

@ -667,7 +667,7 @@ class ArticlesGenerator(CachingGenerator):
self.get_template(draft.template),
self.context,
article=draft,
category=draft.category,
category=getattr(draft, "category", None),
override_output=hasattr(draft, "override_save_as"),
blog=True,
all_articles=self.articles,