Handling drafts #96
-
How do you handle drafts on statiq.web ? What I would need as someone writing articles on my blog is:
Is there something built-in to do that ? I think that some static generators use a property to mark some of their posts as "draft" and then you can use their CLI to display or not drafts. I have seem that on your personal blog @daveaglick you use a draft folder but I don't really understand if it's just to store some draft articles that you can't preview or if there is a mechanism that allow you to preview them locally but prevent them from being published when you deploy you static site. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a great question! Folks have come up with a few way of doing this. The most common (probably because it was supported back in Wyam) is to set
That will cause the post to be excluded from the build and then you can clear or set the Another approach is to set
Alternatively, you could exclude everything in an entire folder by adding a
You could even get really fancy and toggle exclusion based on some other condition like a setting when working locally or not:
|
Beta Was this translation helpful? Give feedback.
This is a great question! Folks have come up with a few way of doing this. The most common (probably because it was supported back in Wyam) is to set
Published
to a future date:That will cause the post to be excluded from the build and then you can clear or set the
Published
value when you're ready to post.Another approach is to set
Excluded
which is new to Statiq Web. By default,Excluded
looks atPublished
to determine if the document should be excluded. But you can configure it to something else. For example, if you wantExcluded
to look for aDraft
front matter value instead you can set the following in a_directory.yaml
file:Alternatively, …