3 min read
Yesterday I wrote a script to help myself blog more often. This is what it looks like in the terminal:
post new [post title]
post search [post title]
post edit [partial post title]
I really like Jekyll, but having to manually create files with the Jekyll filename format (
YYYY-MM-DD-post-title) is a bit of a hassle. Clearly you could just do this by hand, but if you're like me and want to automate all the minutia in your life, then that's not going to cut it.
The other reason I decided to write a script for managing Jekyll was friction. Blogging can be fun, but sometimes it's hard to get myself to actually start writing posts. In the past, that was largely because my post-writing workflow looked something like this:
Steps 3-7 were really causing a lot of friction when it came to writing blog posts. So much so that I still have some posts sitting on my computer that never got published because interacting with the WordPress UI is just too tedious. Here's what my new workflow looks like:
post new Jekyll Management Like a Boss
Now I have no excuses. If I don't write a post, I can only blame my own lassitude since I now have a super efficient workflow. This is a good thing.
The only existing option for managing a Jekyll blog that I came across was Octopress. It's a good project, and I already miss some of its features by not using it, but to me it had one glaring problem: Theming. There is limited documentation on how to theme Octopress, and while there are a bunch of 3rd-part Octopress themes to choose from it's just not good enough. I have nothing against using premade themes, it's just that once in a while you will probably want to change some little thing about the site and if you don't know how it's a real pain.
The other reason I decided against Octopress, is fairly minor, but significant in my mind: The CLI syntax. If you don't know, creating a new post in Octopress looks like this:
rake new_post['Post Title']
To me that just doesn't make sense, when you can just as easily write a script to do the same thing with much less typing:
post new Post Title
Octopress certainly does way more than this little script I wrote, and I'm sure those guys knew exactly what they were doing when they designed the CLI the way they did, but it's the little things like that that really make the experience for me so I just decided to write my own.
For anyone interested, you can find my script on GitHub: https://github.com/iansinnott/jekyll-post
Note: I haven't optimized this script for use on other systems, so it may well not work on Linux or especially Windows. It also won't work on any system without Node installed.