When I thought about creating this blog, one of the prerequisites was to have agility and ease with the setup. I wanted to focus on what really mattered: writing. And there’s nothing better than writing in markdown, which is my favorite markup language! I love how easy it is to read, how simple it is to format the text, and how light the format is.
With that in mind, I looked for some alternatives to get my blog up and running.
Jekyll comes to the rescue!
In my research, I noticed that people really liked using Jekyll. Jekyll, which is written in Ruby, is also the engine behind Github Pages - which was one of the initial ways I was looking to publish my content. Overall, Jekyll seemed very popular and I found several examples and templates already created to create my own blog.
When setting up the first version of the blog, I didn’t have any major difficulties. I must admit that the hardest part was getting to adapt to using liquid, which is the template engine used by Jekyll. Liquid uses a combination of objects, tags, and filters to control the content that will be displayed.
So, for example, my default blog page was a file called default.html
with the following content:
---
layout: default
permalink: /404.html
---
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include header.html %}
<div class="page-content">
{{ content }}
</div>
{% include footer.html %}
</body>
</html>
In practice, it’s the kind of configuration that doesn’t need to be done multiple times: once you’ve configured it, you don’t have to make any more adjustments to the template. With that, the rest of the blog’s general configuration was very easy, and as I was writing new posts I only had to worry about the text itself - especially considering the ingenuity of building and deploying using github actions ⚡️
Some time later…
As time went by, I noticed some peculiarities of Jekyll. One of them was some incompatibility I faced with Ruby: I remember updating the Ruby version on my machine for another project and ended up breaking the local Jekyll’s operation.
After a lot of research, I saw that there was some drama around the fact that the main Github Pages Gem had no plans to support Jekyll 4. 👀
Another point that I didn’t like was how hard it was to install and maintain the local environment in Ruby, besides the weird dependency management style that Jekyll use - something that seemed unnecessarily complicated to me.
I spent a long time without posting - life happens! 🥸 - but I received a nice incentive in the form of a very hefty bill to pay with the value of this domain. I was too tired to go back to Jekyll considering all the previous points, so…
Time to do some makeover!
I researched new frameworks and found Hugo - which claims to be the “world’s fastest framework for building websites”. I read the documentation and it seemed very simple, and at the same time, very similar to what I had already become used to with Jekyll. Hugo is open source and written in Go (which I recently learned) and promises a lot of flexibility in creating content.
So, with a lot of courage to tackle this challenge, I decided to migrate. I used the strategy of creating a new folder and configuring the new Hugo project from scratch, adding the features I wanted one by one. I chose a new theme, configured it and made small adjustments until I was happy, then I added my pages with the posts almost one by one. Since they were already in markdown, it was very easy - I had to make small adjustments by converting some liquid tags to the correct new format.
One of the hardest parts of this migration process was configuring this blog’s multiple languages, since I write the posts in both English and Portuguese. But solving this problem was actually quite simple: Organize my content and make the following configuration in the hugo.toml
file:
[languages]
[languages.en]
contentDir = 'content/en/'
languageName = '🇬🇧 English'
weight = 1
[languages.pt-BR]
contentDir = 'content/pt_BR/'
languageName = '🇧🇷 Português'
weight = 2
With that and a few more tweaks to the deploy file, my blog was up and running - and actually faster than ever! 🚀