So I wrote a little bash script this morning to make creating a new jekyll post easy for my blog.

array=( $@ )
_filename=$( printf "%s-%s" "$(date +%F)" "$_first" )
_postname=$( printf "%s %s" "$_first" "$_rest" )

echo $_rest

for var in $_rest 

cat <<EOF > _posts/$
layout: post
title: $_postname
comments: true
date:   $(date +%F_%T) 
categories: $_last
tags: ['']


# Contents

# Support Me!

This post took XX hours to research, photograph, write and edit. If you appreciate the information presented then please donate! 
<form style="text-align: center;" action="" method="post" target="_top">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="BR247JAZBTUJJ">
<input type="image" src="" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="" width="1" height="1">

If you have any questions or comments, please comment below! I read every comment and respond to most.


open _posts/$ 

All the arguments except the last are the name of the post and file. The last argument is the category.

It then opens it, as I’m in OS X, in mac vim. I just hit the keys ‘Go’ (heh, funny) and start editing. Visual Studio Code.

I certainly could be done better, but I’m not a bash guy. This works for now and I can change it as time goes.

Updated August 3rd, 2017

See This post for more. Specifically the opengraph section to see how the image and description properties work.