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.
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
.scssfiles and they are compiled automatically; nonode-sassordart-sassrequired - Built-in search index β set
build_search_index = trueinconfig.tomland 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 checkvalidates all internal and external links before you deploy - Live reload β
zola servewatches 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 --lockedQuick 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 checkProject 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