How I Made Jekyll Post Generation Just a Touch Easier

Now that I’m running my blog using Jekyll, one thing I’ve already found to be rather frustrating is the post generation process. I have a blank .md template I open, save in a new location, then edit, but that seems cumbersome, to me. What I decided to do instead is write a quick Ruby script that generated a post .md file for me based on the information I provide.

Thought Process

I wanted to keep it simple, and just do only what I really needed. I don’t need any fancy logic or checking. I know _posts will be there because I put post_generator.rb inside my Jekyll directory.

Working Example

Here’s my code as it stands inside right now:

It’s functional. It’s not clean and could be refactored a but, but it works.


A few things that came to mind after I finished: – Use the system date if none is provided – Re-format the title with title-casing. Without ActiveSupport in Rails, I’ll have to either require it as a gem or write something by hand. I’m thinking the former. – Allow the user to write the post right there in the command line and not have to open a text editor. – Allow the user to choose which text editor to use at the prompt (perhaps with detection?)

It’s a good first draft and it serves the purpose I had in mind. Here’s the GitHub repo.

The Vox Media Open Source Meme Generator

I spent some time scouring GitHub this afternoon looking for cool projects. One I stumbled upon was a tool created by Vox Media for creating Twitter cards and Instagram images that included text, source, and site brand logo. I thought it was pretty interesting so I gave it a look-see and started it up in my own space.

I’m not sure if it’ll serve me much purpose and I haven’t seen Vox use it much if at all lately. It might have been a one-time use tool, probably around election time. If you’re interested in giving it a whirl, check it out their GitHub page, their running example, or my running example.

One thing I’m not sure they totally get is that these image aren’t quite memes. These are memes.

page 1 of 1