Write Command
January 16, 2014
I’ve been using my blogging engine hotchocolate for over a year now and one of the things I’ve been meaning to do is create a command to create a new post for me. This is part of the reason I’ve been learning how Mercenary works this past week.
I’m still planning on keeping hotchocolate around as a learning playground, but I’m pretty sure I’m going to be switching this very blog over to a jekyll powered site so that I can host it on GitHub Pages and get access to a lot more features that hotchocolate currently doesn’t have.
One of the features that I’ve been thinking about adding to Jekyll is the ability to create a new post from the command line. There have been lots of people already who have made their own scripts to do this, but nobody has used Mercenary yet and added this to Jekyll core, or so I thought. First, here are some links of people who have created their own scripts to create posts from the command line:
- http://joshbranchaud.com/blog/2013/01/11/Jekyll-Post.html
- https://github.com/mmcclimon/mr_poole
- https://github.com/talison/jekyll-cmd-line
- http://minhajuddin.com/2010/10/01/helper-script-to-create-new-posts-using-jekyll
- http://jonasforsberg.se/2012/12/28/create-jekyll-posts-from-the-command-line
I almost opened my terminal this morning and created a new Jekyll branch so that I could start working on this new feature myself. Luckily I kept searching and found that somebody had already started working this very feature months ago!
- initial write command issue: https://github.com/jekyll/jekyll/pull/1148
- current write command issue: https://github.com/jekyll/jekyll/pull/1395
So, now what is left to do? Honestly, I’m not really sure, but it looks like some tests might be missing so that is probably something I could work on adding in. The first step is to checkout a local copy of the branch and start using this feature for myself and see what issues come up, and go from there.