Make marking articles as drafts case-insensitive

Previously if you tried to mark an article as a draft by using a different
casing (for example, draft) you would get a warning when building:
`Unknown status Draft for file foo.md, skipping it.` This uses a
case-insensitive comparison when looking at article status instead. I
believe this behavior is a little easier for new Pelican users.
This commit is contained in:
Jamie Culpon 2013-12-04 09:32:52 -08:00
commit c9b84abe46

View file

@ -407,9 +407,9 @@ class ArticlesGenerator(Generator):
self.add_source_path(article)
if article.status == "published":
if article.status.lower() == "published":
all_articles.append(article)
elif article.status == "draft":
elif article.status.lower() == "draft":
self.drafts.append(article)
else:
logger.warning("Unknown status %s for file %s, skipping it." %