5 October 2010

Jekyll

by mo


jekyll - static site generation

on windows

  • install ruby 1.8.7 installer
  • install ruby devkit 3.4.5
  • unzip devkit into ruby install (c:\ruby)
  • gem install jekyll
  • gem install rdiscount

jekyll configuration

  • the site structure is pretty self explanatory.
  • create a _config.yml in the root dir and add markdown: rdiscount so that you don’t have to type jekyll --rdiscount

To load the local mysql database i went and created a backup by logging in to the godaddy.com dashboard and created a backup. then i ftp’d the backup to my local machine.

MySQL

$ mysql> create database wp;
$ mysql> use wp;
$ mysql> source d:\tmp\wp_backup.sql

importing the old posts

ps > $env:EDITOR = 'gvim -f'
ps > gem open jekyll
  • copy the wordpress.rb and csv.rb to your sites _import directory.
ps > gem install sequel mysqlplus
ps > gem install sequel
ps > gem install mysql

from the _import directory

$ ruby -r 'wordpress' -e "Jekyll::WordPress.process( 'wp', 'root', 'password')"
  • wp is the name of the database i created in mysql.
  • root is the username
  • password was the password.

The original import didn’t include lots of details from word press like categories, time and comments. so I found another way to import those details from this post.

💎