4 min read

to hugo

My trouble on the way to a new blogging software: I wanted to blog more, but an update of some ruby broke my blog….

So i try something new, bug it should be a statice website genrator After some searching I found this website:

https://www.staticgen.com/

I found some useful blog entrys.

Hugo is quite the same as jekelly, but with go developed. The blog entry makes a quite nice impression, so I’ll give it a try:

the installation in archlinux is quite simple:

yaourt hugo

The quickstart Video is very well done. Octopress doesn’t offer that much of documentation, so I can see this fact.

The first thing I see is that you create new directory for each side you want to have that makes a hugh differences.

The next thing what needs to be done is definine a thema, by default hugo doesn’t include any type of thema without you’ll have static html sides with no navigation.

git clone https://github.com/zyro/hyde-x

In the configuration you can use the parameter to fix the theme for the creation of the site theme = "hyde-x"

I copied the old posts into the new content/posts and lets see what hugo will have to complain about:

ERROR: 2016/05/28 Error parsing page meta data for post/2012-01-08->move-gnome-to-fluxbox.html
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 Error parsing page meta data for post/2012-01-19-gentoojetty-with-a-war-file.html
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 Error parsing page meta data for post/2012-01-26-debiannginx-with-ssl.html
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 Error parsing page meta data for post/2012-02-24-libvirt-lvm-storge-backend.html
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 Error parsing page meta data for post/2013-01-22-update-blog-1.html
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
ERROR: 2016/05/28 yaml: line 2: did not find URI escaped octet
CRITICAL: 2016/05/28 Errors reading pages: Error:yaml: line 2: did not find URI escaped octet for 2012-01-08->move-gnome-to-fluxbox.html
Error:yaml: line 2: did not find URI escaped octet for 2012-01-19-gentoojetty-with-a-war-file.html
Error:yaml: line 2: did not find URI escaped octet for 2012-01-26-debiannginx-with-ssl.html
Error:yaml: line 2: did not find URI escaped octet for 2012-02-24-libvirt-lvm-storge-backend.html
Error:yaml: line 2: did not find URI escaped octet for 2013-01-22-update-blog-1.html

The migration is not as simple as I did expect. This is because I have a lot of old files from my first blog as native html. I need to remove this to ensure that the server can start. I need to convert or add them later. In addtion I need to move the upload folder as well.

While I was migrating, I found some fuck up in my configuration. I had once… many copy of the same blog on many different computes. I mixed stuff up. So at some point i did united them to a single folder on my x240 But somehow some of the running version where empty.

Right now I wasn able to fix that. So it also is something liek a clean the blog anyway. In addition I had to clean up the meta file so hugo would create the blog as intended.

But when you play a bit around you might get the solution. Which was simple, I had to adjust the yaml code on the old files. As far As i can see is that there are some draft now published to the blog. Only the release date went missing. But that’s detail work I will address tomorrow.

Next is to create a archive site. This is usefull to get a list of all the public listed entries and compare them. But there is not such a thing in Hugo. But lucky me, there is a good form entry

I followd the secound example. It’s not perfect but the I change some of the stuff. Like to add to the new theme the a 404 page:

cp themes/hyde-x/layouts/404.html ./themes/purehugo/layouts/

In the end I had to manuel update my html page with a page

Deployment via hugodeploy

But this also didn’t went well. In the end I just did run rsync of the public folder.

In the end I hade to add a redirect from nginx for the rss link. In the / location.

rewrite ^/atom.xml /index.xml permanent; 

One think that comes to my mind is the question how well Hugo is going to work on the long run. Octopress was really nice, but with time the code stop working because the ruby package keep being changing. So far I can see that the project is more active than octopress ever was. But only time can tell

best regards Akendo

PS: This need to be clean up later. But for the moment I’m done with the router