[Jekyll](EN) Make jekyll blog post private

Update(2019.08.18): Add --unpublished option example to build ‘published: false’ post for local build.

Make jekyll blog post to private(not published)

Environment and Prerequisite

  • Jekyll
  • YAML

Front Matter’s published variable

When we make jekyll post, we always make yaml front matter.

Add published variable to front matter yaml and give value to private.

  • published: true: post to public
  • published: false: post to private

layout: post
title: [title post]
published: false

This option makes not to generate specific post. So if this option exist then its post will not be shown in local or server after build. If you’d like to see this post for test in local not in server, then add below option when you build.

  • Add --unpublished option when build
  • jekyll build command could be different depends on user’s system
bundler exec jekyll serve --unpublished
# OR
jekyll serve --unpublished