Skip to content

Draft Directory

thomasthaddeus edited this page Dec 8, 2023 · 1 revision

Documentation for _drafts Directory

The _drafts directory in a Jekyll website is a special folder used to store draft posts. Posts in this folder are not published until they are moved to the _posts directory.

Usage

  • Place your unfinished blog posts in the _drafts directory. These files do not require a date in the filename.
  • When you're ready to publish a draft, move it to the _posts directory and add the appropriate date to the filename.

Previewing Drafts

  • To preview your drafts as part of the site, you can run Jekyll with the --drafts flag. This will build your site with the drafts included as if they were published posts.

Best Practices

  • Regular Reviews: Periodically review your drafts to either complete or remove them.
  • Consistent Naming: Use a consistent naming convention for your draft files to easily identify and manage them.
  • Front Matter: Include front matter in your drafts to make the transition to a published post smoother.
Clone this wiki locally