Jekyll quick post shell script
Here’s a quick script I wrote to create blog posts for my jekyll blog.
usage
jk_quickpost.rb title [categories [filetype]]
title
Used as the title, description and slugcategories
Comma or space separated list. It’ll try separating by commas first and then spaces if commas didn’t work.filetype
Any filetype that jekyll supports. EG:md
,markdown
,textile
,html
, etc..
example
jk_quickpost.rb "Hello world!" "my, blog post, of, doom" "textile"
Notes
The @ROOT
path in this script is set to the present working directory. My personal version is set to the full path to my jekyll _posts
directory.
I have it pushing the new blog post to an origin
remote in the master
branch. You might want to change that to a gh-pages
branch instead.