Scott Watermasysk

Still Learning to Code

Octopress Customizations

Here is a quick list of non-style changes I made before deploying my Octopress site (see it all on Github):

  1. Permalinks only contain the title. No need for other dates/etc. (permalink: /:title in _config.yml)

  2. Moved archives out of the blog directory. I am not going to write a post called archives (at least I hope not), so there is no need for the extra directory.

  3. Added a 404 page.

  4. Swapped the order of page title and site title. All sites should do this. Might send this as a pull request.

  5. Added the about me aside to my sidebar (custom/asides/about.html)

  6. Added rel=”author” to the author include.

  7. Wired up the excellent Rack-Rewrite for handing old urls and forcing all requests to one domain.

1
2
3
4
5
6
7
8
9
10
11
12
 use Rack::Rewrite do
    r301 %r{.*}, 'http://www.scottw.com$&', :if => Proc.new {|rack_env|
      rack_env['SERVER_NAME'] != 'www.scottw.com' && ENV['RACK_ENV'] == 'production'
    }

    r301 %r{^/life|code|business|software(/.+)}, '$1'
    r301 %r{^/archive$}, '/archives'
    r301 %r{^(.+)/$}, '$1'
    r301 %r{^/tags}, '/'
    r301 %r{^/atom$}, '/atom.xml'
  end
  

Note: The 404 and rewrites only works with Octopress because I am using a Ruby (Heroku) host.