personal tech blog and portfolio
Ruby CSS JavaScript
Latest commit baf83a2 Jun 22, 2014 @jch Merge pull request #11 from jch/fix-util-crawl
Robust dead link crawling

Build Status

This is the content and Rails app that serves Posts are written in markdown and stored in the posts folder.


An article is a folder with a markdown document named index.text. When an article is requested, it is rendered as html with the layout, and cached. Cache expiration is based on file modification timestamps.


The canonical permalink format is:


This will be matched against possible post paths. If a post cannot be found, a 404 will be shown.

Legacy urls are 301 redirected by DeprecatedRoutes middleware.


Post assets served from public.


There are utility rake tasks to manage posts and publishing:

rake util:crawl        # list all urls in site with status and referer


git clone
cp config/env.sample .env  # customize this
foreman start


Reference documentation can be found at


Staging lives on heroku.

rake deploy          # runs everything under `deploy`
rake deploy:warmup   # warm up Rack::Cache by crawling the site
rake deploy:sitemap  # generate a sitemap

Apache Passenger configuration on VPS:

# /etc/apache2/conf.d/passenger
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.13/ext/apache2/
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.13
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p180/ruby

To reload:

sudo service apache2 restart


  • server-side syntax highlighting - done clientside w/ js right now
  • code overflow scroll
  • helpers for linking to other posts
  • gemify to separate code from content
  • custom heroku buildpack