Creating my website
Table of Contents
Today I finally decided to create my website. I was learning for school and I needed a break, so I decded to take a look into static site generators.
Why static site generators?⌗
Well, I love how you can have the best of both worlds. You can easily add/modify/remove content, as on dynamic sites, but you still have blazingly fast loading times, as with static sites.
Docusaurus vs Hugo⌗
I already knew Docusaurus. I used to create a simple documentation for one project I’m doing with my friends and it’s great for that. But creating a nice looking static site that doesn’t have the “documentation” wibes would require me to learn React, which I don’t know. I probably will learn it, but it’s not a “quickly create a website” solution.
Meanwhile Hugo has a ton of themes already and I could just pick one. And I did! I will probably modify it in future, but it’s great for just setting up a simple website quickly. And Hugo is faster. Like wayyyy faster. I installed on my Raspberry Pi 3, which I use to host static websites, and it generated my site in less than a second! Meanwhile Docusaurus takes over a minute… It’s slow even on my desktop which has Ryzen 5 3600 in it. And that’s not a bad CPU.
Terminal theme⌗
I just love it! Apart from the site being aligned to left, but that can be luckily changed in the config. It has a really nice font, nice code blocks and generally everything. I’mm looking forwart to when I’ll finally have some time to dig into the theme’s source code and modify it to suit me 100%. Also, I don’t like just using a theme from someone else without giving it something from my style. But like, this one’s basically what I’d love to create, so…
Hugo⌗
First time use without knowing anything about it? Great!
I’ve had a template running in 10 minutes. It’s just a matter of installing hugo
on my system, running hugo new <site_name> <folder_name>
and then just cloning
(downloading) the theme you like into ./themes/<theme-name>
choose it in your
config file and you’re done!
To add a template markdown file run hugo new <name>
and it will create it
in ./content
automatically. Modify it to your likings and run hugo
to
build the site! Everything’s now “published” in ./public
.
I’ll for sure try to learn how to create custom themes and stuff as I now plan to migrate some other websites I run to it. They’re now on wordpress because of other people and some plugins we need, but it looks like Hugo will be to handle all of our needs.