Fork me on GitHub
21 July 2015

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.

TimeZone

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:

timezone: America/Los_Angeles

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:

date: 2015-07-21 08:15:00

Open Questions

  • 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?

Related Posts

blog comments powered by Disqus