mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Fixed draft blog posts being included in navigation
This commit is contained in:
parent
ae93496d6b
commit
ef5a04a324
@ -134,10 +134,6 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
reverse = True
|
||||
)
|
||||
|
||||
# Temporarily remove posts from navigation
|
||||
for post in self.blog.posts:
|
||||
post.file.inclusion = InclusionLevel.EXCLUDED
|
||||
|
||||
# Generate views for archive
|
||||
if self.config.archive:
|
||||
views = self._generate_archive(config, files)
|
||||
@ -460,6 +456,9 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
if not file.src_path.startswith(path):
|
||||
continue
|
||||
|
||||
# Temporarily remove post from navigation
|
||||
file.inclusion = InclusionLevel.EXCLUDED
|
||||
|
||||
# Resolve post - in order to determine whether a post should be
|
||||
# excluded, we must load it and analyze its metadata. All posts
|
||||
# marked as drafts are excluded, except for when the author has
|
||||
|
@ -134,10 +134,6 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
reverse = True
|
||||
)
|
||||
|
||||
# Temporarily remove posts from navigation
|
||||
for post in self.blog.posts:
|
||||
post.file.inclusion = InclusionLevel.EXCLUDED
|
||||
|
||||
# Generate views for archive
|
||||
if self.config.archive:
|
||||
views = self._generate_archive(config, files)
|
||||
@ -460,6 +456,9 @@ class BlogPlugin(BasePlugin[BlogConfig]):
|
||||
if not file.src_path.startswith(path):
|
||||
continue
|
||||
|
||||
# Temporarily remove post from navigation
|
||||
file.inclusion = InclusionLevel.EXCLUDED
|
||||
|
||||
# Resolve post - in order to determine whether a post should be
|
||||
# excluded, we must load it and analyze its metadata. All posts
|
||||
# marked as drafts are excluded, except for when the author has
|
||||
|
Loading…
Reference in New Issue
Block a user