Few weeks ago, I discovered Octopress, via a Quentin's blog. It's a blog aware and Jekyll based static site generator. Didn't really know those two (Octopress & Jekyll), but I observed they are really light and powerful ways to create content based websites. No more database, juste flat files!
How it works
Based on ruby, jekyll is able to compile a website from several flat files : structure files and content files. The basic structure of a jekyll directory is the following:
After compiling, the "_site" folder contains the files you can upload to your web hosting service.
Here are the steps I followed to migrate this weblog from the monstrous wordpress to the lightweight jekyll (based on jekyll's tutorial).
Running Mavericks, I already had ruby installed. If not, there are many tutorials to install it.
Then, just a little test (I'm a ruby noob!) :
In order to get the all requirements, I got homebrew: the mac package installer.
Then, a "brew doctor" permits to know which packages are missing or out of date.
Finally, I upgraded the package (git) that needed to...
It's now time to get Jekyll up! And it's as simple as a one-line command:
When finished, let's create the website...
So we now can check our brand new jekyll site structure.
4.Import blog posts
The command is the following:
To make it work properly, I had to install some gems before...
It was then possible to run the blog posts import. My weblog's database was hosted by OVH and it's not possible to access it remotely. So I first replicated it locally (note that it works better with "127.0.0.1" than "localhost"):
It's almost finished!
Now, all posts from wordpress are imported...
Note that they are converted in markdown, but it will need some changes to get a clean blog post.
Back to website's main directory...
The only remaining step is to compile the website, so that we'll get a "_site" folder containing all the hostable files!