A Blog about Thijs de Vries

A blog

Enki Setup

So I finally broke down and started my own blog. Before I used services such as Livejournal and SmugMug to share photos and my life story. For awhile now I’ve been been wanting to start a tech blog and figured Livejournal no longer met my needs. I hope to start to develop Ruby on Rails plugins and host them on this site to share them with the Rails community. For now I’m going to give a short tutorial on setting up an Enki blog.

I decided to use Enki since it is Ruby on Rails based and I happen to be a Ruby on Rails developer. From what I’ve read it seemed much more light weight than other blogs. Customization is done through hacking the code. By default Enki is not very pretty, it just gives you the skeleton needed to contain posts, pages and other standard blog stuff. To change this, just hack at the rhtml files and css files to taste. Remember Enki is just a rails app which has the skeleton of a good blog.

I have modified the instructions at Enki website. Essentially my instructions are the same but try to fill in some of the gaps in the instructions. It is assumed that whoever attempts this has knowledge of Ruby on Rails.

git clone git://github.com/xaviershay/enki.git enki
git checkout -b myblog # Create a new work branch
cp config/database.example.yml config/database.yml

At this point you want to edit database.yml appropriately. You also want to edit config/enki.yml. By default it contains the following parameters.

# Configuration options for your blog - customise to taste
# This file contains no secret information, so can be stored in source control (unlike database.yml)
title: My Enki Blog
url: http://enkiblog.com
  name: Don Alias # For copyright notice and ATOM feeds
  email: don@enkiblog.com # Exception emails will go here, and it is used in ATOM feeds
  open_id: # These are used to login to the admin area
      - http://enkiblog.com
      - http://secondaryopenid.com

# Delete the following section if your site will not be acting as an OpenID delegate (http://wiki.openid.net/Delegation)
# If you're deploying with mongrel, make sure you read http://rhnh.net/2008/04/13/nginx-openid-delegation-and-yadis
  server: http://www.myopenid.com/server
  delegate: http://username.myopenid.com

You probably wanna change the title, url and author info. Under open_id you will notice a list of open id urls. You should delete these and add your own open id url. I got my openid from myopenid. If you are unfamiliar with open id authentication, Ryan Bates has an excelent railscast on the subject. You need to have an openid in order to login with the default Enki login. If you want to have multiple users login to your blog, you can probably add multiple open ids to the list but you are probably better off storing users in a database and keeping there open id info stored there.

rake db:migrate
rake spec

Note, after running rake spec, it will notify you on what other plugins you need to install. You can probably just run

rake gems:install

to install the required gems. At this point your blog should be ready to go. You may notice if you go to localhost:3000/admin there is a checkbox that has Bypass credentials check. This allows you to log in without any credentials for development. This checkbox, and the ability to bypass security are disabled in production mode.

Obviously at this point you will want to customize the blog to your needs but you should have the skeleton needed to get started.

Happy Blogging,