Creating draft posts in Jekyll

How to create and develop with draft posts in Jekyll

If you want the ability to write an article over the course of a few days and ensure it’s version controlled but not publicly visible, here’s where drafts come in useful!

You will want to create a folder called _drafts/ in the root of your project. In that you can place your draft article using the same naming convention as you would for something in your _posts folder (i.e. 2024_04_30_my_article.md). This will ensure the article doesn’t show up on your site.

To work on a draft article locally run jekyll serve --draft, this will show your draft article so you can view it locally on the frontend.

When you’re ready to publish your article just move it from the _drafts/ folder to the _posts/ folder and deploy.

Recent posts View all

Web Dev

Check in with your database

It pays to take a step back and look at how your database is set up every so often. You will often find quick wins and hidden tech debt.

Web Dev Productivity

Keeping on top of website updates

Learn what website updates are, what they entail, why they are important, and how we can help