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 DevProductivity

Keeping on top of website updates

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

Freelancing

Getting the most out of your agency

Here are some tips based on years of working with, for, and as an agency on how to get the most out of any work you do.