Creating New Jekyll Posts with Bash

December 02, 2014

Jekyll's pretty damn sweet, but I found myself hating this part of the blogging process:


Since I'm normally on the command line anyway for my blog posts, this seemed like a good opportunity to create an executable:

A few things here should be customized for your needs:

blogFolder should be the path to your own Jekyll blog.

YAML should be the YAML matter you want at the top of your blog posts.

vim can be interchanged with whatever symlink you have to your favorite editor. I'm currently digging Vim for blogging, but Sublime's pretty great too!

In order to make it executable so you can access it from anywhere on the command line, throw the script into /usr/local/bin/new-post and make it executable with the command chmod 755 new-post.