A few days ago, I decided to migrate my website from Jekyll to Hugo. Instead of using a theme from the Hugo community, I wanted to port my existing website. Converting, markdown content and SCSS wasn’t hard. I read a few articles, blogs, and the original documentation to learn about Hugo’s directory structure. Then simply copy-pasted files. The hardest part was the templates.
If you don’t have anything custom, and displaying blog posts is enough for you, migrating from Jekyll should take nothing but a few minutes. Yet, if you are going to make something custom, you have to learn about the Hugo templates. By custom, I mean listing the posts the way you wanted to list them, loop through them, group them by some property, and so on. The object here doesn’t have to be blog posts, it can be movies, actors, games, players, authors, books, genres, musicians; depending on the context of your site. You probably won’t need to play with Hugo templates if you are going to create a simple portfolio, project showcase, or blog site. Yet, I usually waste my time figuring out how things work. If you can call it a waste.
Why I migrated from Jekyll? Jekyll probably is the most popular static site generator. In 2018, when I first decided to create a blog, I met Jekyll. Popularity is important here, it means a strong community. In consequence, popularity helps you find solutions to your problems quickly. Because someone else already faced the same problem and asked about it in the community. To be honest, I didn’t make good research about static site generators. I read that Jekyll is the most popular and well-documented one. Also that it’s fairly easy.
Before starting with Jekyll, I considered to learn Django. I knew some Python already then I figured, Django would be an overkill for a static site. Anyway, I chose Jekyll and went down the rabbit hole. Learned the templating language Jekyll using called Liquid and learned a bit of CSS.
With my weird and unnecessary templating fantasy Jekyll started to being slow. I made a quick search about other static site generators and found Hugo is faster and very popular like Jekyll. Yet, I wasn’t ready to learn another templating language. Note that Hugo is a little bit more complex than Jekyll.
Someday, I wanted to develop my blog on a different computer and I realized how cumbersome is to install the ruby environment and all that dependency hell Jekyll required, especially on windows. Hugo works with a single binary. Still, I can not re-build all that to just get rid of dependencies.
Recently, I took a machine learning class. We were using the R language in class. I chose to play cool with Rmarkdown files then I thought “what if I can host Rmarkdown files using Jekyll”. Turns out Blogdown does it and it supports Hugo mainly.
Besides all that, in times of covid-19 quarantine, I had enough time to learn Hugo. So, I migrated to Hugo.