Let's say your Jekyll site's directory structure looks like:
|-- _config.yml
|-- _drafts/
| |-- a-draft-post.md
|-- _layouts/
| |-- default.html
|-- _posts/
| |-- 2013-05-10-a-published-post
|-- index.html
How to preview a draft post
Normally (and on GitHub Pages) Jekyll will ignore the posts in the _drafts
folder, publishing only the posts in the _posts
folder. If you run Jekyll locally with the --drafts
flag (e.g., jekyll serve --drafts
), Jekyll will include any posts in the _drafts
folder, just as if they were published post (but don't worry, only locally).
The documentation says
Drafts are posts without a date.
.What does it mean?
Does it means I should remove the
date
field from the page:title: 'Something Boring'
date: 2017-11-30
author: Someone
layout: post
class: news
Thank You.