DEV Community

👨‍💻Ioannis Diamantidis
👨‍💻Ioannis Diamantidis

Posted on • Originally published at diamantidis.github.io

1

Working with drafts on a Jekyll blog

Did you know that Jekyll supports drafts by default?

The process of writing a post may span to multiple days; from the time you jot down an idea, to writing the post, polishing and eventually publishing it.

Instead of creating a post, you can start using drafts for those unfinished posts that you don't want to publish yet.

To start using drafts on an existing Jekyll blog, just follow the following steps:

# Create a folder named `_draft` on the root directory of your blog 
mkdir _drafts
# Inside '_draft', create a Markdown file for your first draft
touch _drafts/my-first-draft.md
# Open this file and add some content
echo "my first draft" > _drafts/my-first-draft.md
#  Run your blog with the `--drafts` switch
jekyll server --watch --drafts
# Open http://127.0.0.1:4000 on your favourite browser to see the draft
Enter fullscreen mode Exit fullscreen mode

And that's it!

You can now streamline your writing process using drafts! 🚀


This post was originally published on my blog on June 13rd, 2020.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay