My blog is back up and running. Here are some notes. The Jekyll documentation is probably a better reference.

Install

I followed the instructions here: setting up your GitHub Pages site locally with Jekyll.

Layout and Style

I wanted to make some tweaks to the minima theme so I followed the instructions here on overriding theme defaults.

Plugins

I wanted to use a plugin that would automatically generate a page for each tag where I could see all the posts that had been assigned that tag. Github pages does not support many plugins (more on that) but you can get around this issue by building your site locally and only pushing the static files. To do that I followed the instructions here: Jekyll + Plugins + Github + You.

Then I went ahead and installed the tagging plugin. In order for it to work, I had to remove group: :jekyll_plugins from my Gemfile (see “installing a plugin” Jekyll docs).

I also wanted to be able to embed youtube clips into my posts, so I used this plugin: jekyll-youtube. Again you won’t have issues with Github’s plugin restrictions if you take the “build locally” approach mentioned above. I also found a solution that lets you embed youtube videos in jekyll without a plugin but didn’t use it because I had already done it the other way.

I haven’t done this yet, but I’d like to check out using latex in jekyll.

Workflow

Here’s what I added to my .bash_profile, you’ll need to change it for your directory structure. It assumes you are using the set up described in Jekyll + Plugins + Github + You.

########## jekyll blog aliases / functions #################
alias st='open -a "Sublime Text 2"'

# create a new draft function
new_draft ()
{
    cd ~/Documents/Blog/jekyll/renschler.github.io.raw;
    touch _drafts/$(date +%Y-%m-%d)-$1.md;
    echo "---
layout: post
title: \"$1\"
date: $(date +%Y-%m-%d)
comments: true
tags:
- draft
---" >> _drafts/$(date +%Y-%m-%d)-$1.md;
    st _drafts/$(date +%Y-%m-%d)-$1.md;
}
# create a new draft
alias draft="new_draft" #Usage: draft TitleOfPost

# preview blog with drafts
alias previewB="cd ~/Documents/Blog/jekyll/renschler.github.io.raw; jekyll build --drafts; jekyll serve --drafts"

# push latest blog
alias publishB="cd ~/Documents/Blog/jekyll/renschler.github.io.raw; jekyll build;\cp -r _site/* ~/Documents/Blog/jekyll/renschler.github.io;cd ~/Documents/Blog/jekyll/renschler.github.io;git add .;git commit -am 'Latest build.';git push"