Claus Witt dot com

webdeveloper

As I wrote yesterday I just changed my blog platform from Wordpress to Jekyll. Today I have created some minor tweaks in my setup to allow me to easier create a post, and deploy the blog live. Now I call a simple command in the terminal, with the blog post name as a parameter, and the file is created in the correct place, and opened in TextMate.

And this is how that looks in textmate:

I did a quick search on google - figuring someone else had solved this problem before me - and found this post which was (mostly) what I needed. I have done two minor tweaks to my forked version of the gist he links to.

  • Changed the template file to _template.markdown
  • Instead of outputting the filename, open it in textmat

Then I created two small zsh functions to ensure that I can start a blogpost (and deploy my blog) from any directory on my machine.

And finally I fixed a minor thing, where my ruby scripts and, the deploy.sh file was deployed to the website. The following line was added to _config.yml

exclude: deploy.sh new.rb _template.markdown

The last entry in that file is actually redundant. The reason I changed template.markdown to _template.markdown was actually that it rendered a file on the website called template.html which was empty - the fix to change the name could not be used for the script files (well, it could, but I did not want to do that).

blog comments powered by Disqus