Schedule Jekyll Posts for Publication
Since posts on this Jekyll powered blog are short and very much task focussed they tend to come in fits and starts. Here’s how to stagger their publication.
Control the future
The _drafts folder is a great place for work in progress, but you still need to manually move content from here into the _posts folder when complete. What we really need is a way to control publication date. Fortunately Jekyll provides a way to do this.
Open up your _config.yml file and add future: false. Now whenever you write a post with a filename that has a date in the future it will not be generated by Jekyll.
The publication time is UTC by default. If you want to work to a different timezone simply add a timezone to your _config.yml file. You can find a list of valid time zones on Wikipedia. In my case I am on Pacific Time and so my _config.yml entry is:
Need finer control?
If you need even finer control over when posts are published you can add precise times to the Front Matter. A date here overrides the date from the name of the post. It should be specified in the format YYYY-MM-DD HH:MM:SS +/-TTTT; where hours, minutes, seconds, and timezone offset are optional. For example:
- When the site is published on GitHub pages will the future pages be published automatically? That is, will GitHub pick up the pages even without a commit triggering a build?
- Adding Related Posts to Jekyll Blogs
- Adding an Edit Link to Github Pages in Jekyll
- Adding a Bing Search Box to a Website
- Adding a CSS GitHub Ribbon to a Jekyll Site
- Dockerizing a Jekyll Site
- Adding a Twitter Button to a Jekyll Blog
- Adding Twitter Cards to a Jekyll Site
- Creating a Jekyll Blog