BlogHome

blog init

2022-09-27

So this is it! I wanted to learn something about both Zola (think Hugo in Rust) and Netlify. On a day-to-day basis, I am a game dev tool programmer, so it is something different for me. I will try to write something at least once a month in order to improve both my English and writing.

Zola

At first, I’ve just installed Zola, created new site by writing zola init site, go to site folder and type zola serve and it worked!

I got excited and right after beginning tried to use some themes. It was a trap for me. Most of the themes make many assumptions and requirements about the structure of site content. So on my first day after initial success, I was defeated by this static site generator.

Second day was better. After work I start to read some articles first and then go fight Zola again with more knowledge about it. This time I've look on different themes, stick to one (Serene theme) and precisely follow instructions how to structure content. This time it went without any issues and I was able to quickly create repository, push my content to it and setup deploy process.

Netlify

Netlify basically is a service that allowed me to quickly deploy my site using Zola. I've created netlify.toml file in root of my repository, pasted default values from documentation- only thing that I did is specify ZOLA_VERSION.

[build]
publish = "public"
command = "zola build"

[build.environment]
ZOLA_VERSION = "0.16.1"

[context.deploy-preview]
command = "zola build --base-url $DEPLOY_PRIME_URL"

As a next step, I created a netlify account using my GitHub credentials, create a new site and connect it to my GitHub repository. Config took default values from netlify.toml, I clicked next and after a minute or two the site was up.

After that, I've decided to write that post and add custom domain. It was really easy, but I need to mention that adding TLS certificate threw some errors on config page, but after refreshing it, it worked.

The end

So I guess that’s it. As a next step, I will try to add gitalk comments and then maybe fork theme, because at least for now Projects page doesn’t look as good as it could and should. Thanks for reading!

This work is licensed under CC BY-NC-SA 4.0.