Jekyll: Script To Easily Create New Posts
Jekyll is amazing for me. It gives me full control over all my content in an easy to maintain way while keeping it in a sustainable format.
Though creating a new post is as simple as creating a new Markdown file and setting some variables within the front matter, this usually takes a few moments and most of these steps are the same over and over again.
To make life a little bit easier (and to just have something to fiddle around with, to be fair) I wrote a small script that helps jump-start on new posts. It creates the file, sets the title and date and tags and categories if I wish to and opens that new file in my favorite text editor.
So,
./jekyll-new-post.sh -n "New Cool Post" -d "2014-08-17 15:23:45" -o -t "Jekyll" -c "Development, Thoughts"
would create a new file called 2014-08-17-new-fancy-post.md
with the front matter date property set to August 17, 2014 at 15:23:45, the categories and tags set as well and open it in your preferred text editor.
You can find this script over on GitHub.
So, I you find yourself using Jekyll and keeping a Terminal window open all day this might be for you. Feel free to adapt it to your needs. I will probably fix the remaining todos and add some features I still have on my list. So you should consider this beta.