--- id: 208 title: 'How I migrated to a static blog' date: 2016-04-02 author: pesceWanda layout: post categories: - PesceWanda tags: - static blog - jekyll --- Until one week ago my blog was hosted at my house, on a raspberrypi with debian + wordpress. I was not satisfied by my setup because given the minimal size of my blog and the really scarce content I post every now and then, a full LLMP stack was overblown. I decided to change distribution (my server now runs [Void](http://www.voidlinux.eu/)) and to migrate to a static blog without CMS nor PHP. # Welcome to Jekyll and Hyde The process of migration was rather painless. First of all I installed ruby on my desktop computer, then via ruby gems I installed jekyll: `gem install jekyll` `gem install jekyll-gist` `gem install jekyll-paginate` I used a [wordpress plugin](https://wordpress.org/plugins/jekyll-exporter/) to copy all my old posts. Then I cloned from [git](https://github.com/poole/hyde) the Hyde theme which you can see a demo [here](http://hyde.getpoole.com/) and corrected a pair of warning that jekyll printed on my terminal. Actually the [jekyll docs](http://jekyllrb.com/docs) are quite complete and covered all the errors that I encountered. Jekyll structure is quite simple to understand: in the folder \_post/ there are your post in markdown format (remember to delete the examples in that folder); in the root the are some files that should be modified: the about.md file, the 404 page and index.html that is the frontpage of the blog; finally \_config.yml contains the general configuration for the website and should be adjusted to your own likings. When Jekyll builds a website it parses all the markdown files and stores them in \_site folder. Jekyll uses the html files in \_layouts and \_includes to render the markdown files.A I added a simple [archive page](http://francescomecca.eu/archive/) following the little piece of code in [this page](http://joshualande.com/jekyll-github-pages-poole/) {% raw %} --- layout: page title: Archive --- ## Blog Posts {% for post in site.posts %} * {{ post.date | date_to_string }} » [ {{ post.title }} ]({{ post.url }}) {% endfor %}:wq {% endraw %} I noticed that in \_includes/head.html there is this line: ```