Refreshed website
Mon, Aug 18, 2014It’s been a while that I started this website, at the time Wordpress was the undisputed leader and it’s still very popular among bloggers today. Don’t get me wrong, I truly think it’s an awesome product for managing content with multiple writers but can’t we do better?
The other day I was asking myself few questions while browsing my blog. Do I really need to generate a web page for every single visitor that came to visit it? Where are the moving parts? Is the way I write new articles efficient? What about security?
I came to the conclusion that writing new articles was incredibly painful, the built in HTML editor doesn’t improve my productivity at all, it was quite the opposite in fact. I don’t really use plugins and I think the UI offers too many options for a simple website like mine.
I spend much of my days writing code in a text editor where I’m efficient, I know most of the shortcuts and I don’t have to think about how to write things but actually focus on the things I’m writing. In my opinion having to format your text in wysiwyg creates a lot of unnecessary context switches that makes you lose a considerable amount of time. Wouldn’t a plain text formatting syntax be better after all?
And what about having a completely static website? I can probably live without comments on my articles, people could actually send me emails instead! Or I can just include Disqus like most people do. Better, I wouldn’t even have to worry about getting in the HN frontpage again. I could even write posts offline and actually be able to see the result! The idea seemed really attractive.
I ear you. I know all the cool kids are using Jekyll nowadays and it’s even supported on Github! Meh… there’s only one small problem, I’m not a big fan of Ruby. And I want to actually be able to hack the code if I want to. So Jekyll is a no-go for me.
Unexpectedly, few weeks ago I discovered a new project called Hugo which is very similar to Jekyll but which is written entirely Go. That came right on time since I’m writting a lot of Go code these days so I decided to give it a try.
The project is quite new so there’s not a lot of documentation available yet. They do have one of course, but finding what a specific option do is not the easiest thing ever. Still I was able to make it work quickly. I played with the integrated webserver that automatically update the website while you’re editing a page with your own editor. I liked it.
Few templates hacks later I was here, migrating all of my posts on Hugo. Eventually I moved everything into a git repository and set a simple git post-receive
hook on my server to regenerate the website after each commit. You can read more about this on this article.
Finally, I can say that I’m pretty happy with the result!
As a bonus I also added a valid SSL certificate because this is how all websites are supposed to be served now, no matter what you’re doing privacy should not be an option.
Tags: SSL, blog, Hugo