Zola

A fast static site generator in a single binary with everything built-in β€” no Node.js, no plugins, just Markdown, Tera templates, and Sass.

Screenshot of Zola

Zola is a static site generator written in Rust that ships as a single binary with no external dependencies. There is no Node.js to install, no plugin ecosystem to configure, and no build pipeline to assemble β€” just a zola build command that takes Markdown content and Tera templates and produces a complete static site in milliseconds.

It is the tool used to build this very site.

Features

  • Single binary β€” one file, no runtime dependencies, trivial to install on any machine or CI runner
  • Built-in Sass compilation β€” write .scss files and they are compiled automatically; no node-sass or dart-sass required
  • Built-in search index β€” set build_search_index = true in config.toml and Zola generates an Elasticlunr.js-compatible index for fully client-side full-text search
  • Tera templates β€” a clean, Jinja2-compatible templating language; if you've used Jinja2, Django templates, or Nunjucks you'll feel immediately at home
  • Taxonomies β€” define custom taxonomies (tags, categories, series…) and Zola auto-generates listing and detail pages for every term
  • Shortcodes β€” embed custom HTML snippets in Markdown using a simple macro syntax
  • Syntax highlighting β€” code blocks are highlighted at build time, with no client-side JavaScript required
  • Multilingual sites β€” first-class support for multiple languages in a single site
  • Link checking β€” zola check validates all internal and external links before you deploy
  • Live reload β€” zola serve watches for changes, rebuilds incrementally, and reloads the browser automatically
  • Feeds β€” generates Atom and RSS feeds automatically for any section

Installation

Download a pre-built binary from the releases page, or:

# macOS
brew install zola

# Debian / Ubuntu (Debian 12+)
apt install zola

# Fedora
dnf install zola

# Arch Linux
pacman -S zola

# Alpine Linux
apk add zola

# Snap
snap install zola --edge

# cargo
cargo install zola --locked

Quick Start

# Create a new site
zola init my-site
cd my-site

# Serve locally with live reload
zola serve

# Build to the public/ directory
zola build

# Check all links
zola check

Project Structure

my-site/
β”œβ”€β”€ config.toml          # Site-wide configuration
β”œβ”€β”€ content/             # Markdown content
β”‚   β”œβ”€β”€ _index.md        # Homepage content
β”‚   └── blog/
β”‚       β”œβ”€β”€ _index.md    # Section config (template, sort order, etc.)
β”‚       └── my-post.md
β”œβ”€β”€ templates/           # Tera HTML templates
β”‚   β”œβ”€β”€ base.html
β”‚   β”œβ”€β”€ index.html
β”‚   └── blog/
β”‚       β”œβ”€β”€ list.html
β”‚       └── single.html
β”œβ”€β”€ static/              # Copied verbatim to public/
β”œβ”€β”€ sass/                # Compiled to CSS automatically
└── public/              # Generated output (not committed)

Configuration

config.toml controls everything about the build:

base_url = "https://example.com"
title = "My Site"
description = "A site about things."
compile_sass = true
build_search_index = true

taxonomies = [
  { name = "tags", feed = true },
  { name = "categories" },
]

[markdown]
highlighting = { theme = "github-dark" }

[extra]
# Your own site-wide variables, accessible in all templates as config.extra.*
author = "Alice"

Page Frontmatter

Content files use TOML frontmatter:

+++
title = "My Post"
description = "A short summary shown in cards and meta tags."
date = 2024-06-01
draft = false

[taxonomies]
tags = ["rust", "web"]

[extra]
hero_image = "/images/hero.jpg"
+++

Your Markdown content goes here.

Templates

Tera templates have access to rich context variables:

{% extends "base.html" %}

{% block content %}
<h1>{{ page.title }}</h1>
<p>{{ page.description }}</p>
{{ page.content | safe }}

{% if page.taxonomies.tags %}
  {% for tag in page.taxonomies.tags %}
    <a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a>
  {% endfor %}
{% endif %}
{% endblock %}

Deployment

zola build produces a self-contained public/ directory that can be hosted anywhere:

# GitHub Pages (via GitHub Actions)
- uses: shalzz/zola-deploy-action@v0.18.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Cloudflare Pages β€” set build command to:
zola build

# Netlify β€” set build command to:
zola build --base-url $DEPLOY_PRIME_URL