An interesting look through my jekyll workflow of creating a new entry ala Thug Kitchen
Creating a new post? Lets gather what we will need before we even put pen hand to keyboard:
- today’s date
- post title
YAML
properties- awkward as fuck file name
Ain’t nobody got time for that.
rake post
This fucker is so minimal he don’t even need arguments. post__name
comes up in this handy ass prompt. Simple as shit command line input, hells yeah. Quicker than you can hit ‘enter’, template(post__name)
has already been called to drop some efficiency on your punk ass.
template(post__name)
Creating files like a fucking bawse. He takes your post__name
, drops a fucking downcase
on him while making it a valid web address1. Multi-talented shit right there. Don’t even worry about making the same post twice, this crafty fucker has your back.
Whoa, where are you going? Shit hasn’t even started to get real. Mother effing boilerplate is what’s going on here. Son this function lives for that shit. Gets some scaffolding all up your face, ready for some mad blogging to go down.
Better find that file and open your text editor. Wat, hells no! Back the fuck up now. sh "subl -w #{newFile}:10"
opens sublime with your newly created post in a flash. You’re fucking welcome. Write the shit out of that post, save and close. BAM! Instantly back in the terminal. Hardcore shit right there if you ask me.
Back to rake post
All this and we are only up to the third line of :post
. This son of a bitch has one more card to play. Another terminal prompt, answer with a mother fucking yes
and your wish of more automation shall be granted. rake local
steps in to build the site for your lazy ass. Evens open the damn browser for you. Respect.
An entire post created by simply runing one rake post
2
Efficient. As. Fuck.
-
Literally pulled from David Lynch’s work ↩