You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a blog, drafts should be completely hidden from the user, so possible future unfinished work is not revealed prematurely. MkDocs Material blog plugin already prevents drafts from being built by default, and these unbuilt posts are also no included in the blog index or categories list.
Bug description
When using the blog and tags plugins together (as outlined in the docs), draft blog posts with tags are included in the tags index, even when they are not built, leading to revealing unfinished work and broken links.
Fixed in 15c024c. Thanks for this very concise issue and perfect reproduction, that made fixing this bug a pleasure! The blog plugin will now mark posts that are marked as draft as excluded. The tags plugin will skip excluded pages. Additionally:
mkdocs serve, by default, renders drafts, which will also appear in the tags index
mkdocs build, by default, excludes drafts, which will now also be excluded from the tags index
This behavior can be changed with the draft and draft_on_serve settings. We're keeping the page in the index if drafts are rendered for consistency. Nonetheless, this issue can be considered resolved.
We're using the new File.inclusion feature, so please make sure that you're on MkDocs 1.5+.
Fixed in 15c024c. Thanks for this very concise issue and perfect reproduction, that made fixing this bug a pleasure! The blog plugin will now mark posts that are marked as draft as excluded. The tags plugin will skip excluded pages. Additionally:
mkdocs serve, by default, renders drafts, which will also appear in the tags index
mkdocs build, by default, excludes drafts, which will now also be excluded from the tags index
This behavior can be changed with the draft and draft_on_serve settings. We're keeping the page in the index if drafts are rendered for consistency. Nonetheless, this issue can be considered resolved.
We're using the new File.inclusion feature, so please make sure that you're on MkDocs 1.5+.
No problem! Thanks for creating such an awesome theme.
Context
When writing a blog, drafts should be completely hidden from the user, so possible future unfinished work is not revealed prematurely. MkDocs Material blog plugin already prevents drafts from being built by default, and these unbuilt posts are also no included in the blog index or categories list.
Bug description
When using the blog and tags plugins together (as outlined in the docs), draft blog posts with tags are included in the tags index, even when they are not built, leading to revealing unfinished work and broken links.
Related links
Reproduction
example.zip
Steps to reproduce
mkdocs build
index.html
fromsite
directory in a browserBrowser
No response
Before submitting
The text was updated successfully, but these errors were encountered: