GitHub Draft Pages

I noticed that some repositories have draft pages available at *.drafts.github.io. All of them seem to be in-development versions of otherwise published pages.

A Google search reveals that there are over 6000 currently published and indexed. I found this post which mentions that pages from non-default branches create drafts. However, I can’t figure out how to create a page draft of my own.

How would I create a GitHub pages draft?

Thanks!

Hi @ginkoid - Welcome to the community! That is a feature of Jekyll, it lets you write draft posts, and allows you to easily preview how they will look prior to publishing.

To start a draft, create a folder called _drafts in your site’s source directory (e.g., alongside _posts ), and add a new markdown file to it. To preview your new post, run the jekyll serve command with the --drafts flag.

For more information about Jekyll and Pages. Check out our documentation.

1 Like