nextra
nextra copied to clipboard
[nextra-theme-blog] Allow for a draft post
Currently, you can get around this by putting a _
as part of the .mdx
file although, I think it would be helpful to have a metadata field like:
---
type: post
draft: true
---
That way, it won't display in the posts list although still have a link that you can send out to people to review that will remain the same after publishing.
@rgoomar
you can get around this by putting a _ as part of the .mdx file although
Do you mind sharing more details on how to make it work? Thx!
@YikSanChan Basically, if you have an _
in the beginning of the filename, it ignores it based on this line https://github.com/shuding/nextra/blob/core/packages/nextra-theme-blog/src/index.tsx#L126
So you can link to it as a post, but doesn't appear in the list.
It would be great if draft pages were also supported. Why to limit this only to posts? Also, I am using Docs theme for blogging, could this be ported to Docs theme too?