Zola is a static site generator written in Rust.

Zola and other static site generators have been gaining popularity in web development due to their security benefits, simplicity, and capabilities to serve content quickly.

Thus, when aiming to develop a static site generator using Zola, it is essential to understand the critical aspects of static site generators and how they may be applied in developing effective static websites.

While most modern static site generators work similarly, it is important to have a small guide to get started. Here are my notes on Zola.

What is unique about Zola?

Simply, Zola is a static site generator that utilizes the Tera template engine. Further, it utilizes a highly compatible and strongly defined markdown specification to enable easy development of static applications.

Benefits of Zola

Main benefits of using Zola static generator in developing static sites include:

  • High scalability due to its capability of rendering the whole site as being static files.
  • It is easy to use due to its highly intuitive designs.
  • High flexibility.
  • Augmented markdown, thus making it easier to develop personalized content.
  • No dependencies.

Installing Zola

Zola is an offline tool that needs to be run locally. There are multiple ways to install it to your computer.

From package managers

A lot of operating systems have a package for Zola in their package managers. Unless you are involved in the development of the project, or you need a bug-fix that was recently released, this should be your primary method of installing Zola.

From source

Regardless of your distro, you can build Zola from the source code. Just clone the Git repository (or download a tarball) and run cargo build --release.

$ git clone git clone git@github.com:getzola/zola
Cloning into 'zola'...

$ cd zola
$ cargo build --release

After the build is complete, you can find the binary in target/release/zola.

Pre-built binaries

You can get pre-built binaries for Linux, Windows and macOS from the releases page. Since the tool is written in Rust, the binaries contain all their dependencies and are easy to install.

How to get started with Zola?

  • Learn how to use the four main commands: init, serve, build, and check. Init is essential for creating a directory structure for querying basic configuration questions. Build implements the website in the public directory. Serve configures the site to a local server. Finally, check attempts to build pages like the build command but don’t have the results implemented on the disk.
  • Understand Zola’s directory structure, which is mainly made up of config.toml, content, sass, static, templates, and themes.
  • Understand how to configure each of the directory structure files depending on the keys needed in implementing the site.

One last tip: enjoy, have fun, and stay curious about learning to implement static sites using Zola static generator. Within no time, you’ll be up and running with it.

Useful links