1
0
Fork 0
forked from github/pelican

Add support for hidden articles

This commit is contained in:
Gio 2021-04-16 19:07:35 -05:00 committed by Justin Mayer
commit add3628a64
8 changed files with 70 additions and 14 deletions

View file

@ -181,9 +181,9 @@ class Content:
if hasattr(self, 'allowed_statuses'):
if self.status not in self.allowed_statuses:
logger.error(
"Unknown status '%s' for file %s, skipping it.",
"Unknown status '%s' for file %s, skipping it. (Not in %s)",
self.status,
self
self, self.allowed_statuses
)
return False
@ -513,7 +513,7 @@ class Page(Content):
class Article(Content):
mandatory_properties = ('title', 'date', 'category')
allowed_statuses = ('published', 'draft')
allowed_statuses = ('published', 'hidden', 'draft')
default_status = 'published'
default_template = 'article'