forked from github/pelican
Add support for hidden articles
This commit is contained in:
parent
487da3550b
commit
add3628a64
8 changed files with 70 additions and 14 deletions
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue