Skip to content

Zola

Zola is a fast static site generator written in Rust. It outputs a fully static site to public/ by default. Since Zola has no build plugin system, pageflare integrates as a post-build step — chain it after zola build in your build command or CI pipeline.

Terminal window
# Shell (Linux/macOS)
curl -fsSL https://get.appz.dev/pageflare/install.sh | sh
# Homebrew
brew tap getappz/tap && brew install pageflare
# npm
npm install -g @pageflare/cli

Run pageflare after Zola builds:

Terminal window
zola build && pageflare public/ --in-place

Create a pageflare.jsonc in your project root to customize behavior:

pageflare.jsonc
{
"minify_html": true,
"minify_css": true,
"minify_js": true,
"js_defer": true,
"lazy_images": true,
"img_dimensions": true,
"font_swap": true,
"preconnect_hints": true
}

If you use a custom output dir (zola build -o build/), pass the same path to pageflare:

Terminal window
zola build -o build && pageflare build/ --in-place
.github/workflows/build.yml
- name: Build Zola
run: zola build
- name: Optimize with pageflare
uses: getappz/pageflare-cli@v1
with:
args: "public/ --in-place"
netlify.toml
[build]
command = "zola build && pageflare public/ --in-place --no-progress"
publish = "public"
vercel.json
{
"buildCommand": "zola build && pageflare public/ --in-place --no-progress"
}
wrangler.toml
[site]
bucket = "./public"

Build command: zola build && pageflare public/ --in-place --no-progress

Zola handles Sass compilation and basic asset colocation, but does not optimize the final output. pageflare adds:

  • HTML, CSS, and JS minification
  • Lazy loading and image dimension inference
  • JavaScript defer and loader injection
  • Font display swap and self-hosting
  • Preconnect hints for third-party origins
  • Critical CSS extraction (Pro)
  • Responsive image srcset generation (Pro)

Zola focuses on content and templating — it doesn’t optimize output. pageflare adds:

  • HTML, CSS, and JS minification
  • Lazy loading and image dimension inference
  • Font display swap and self-hosting
  • Preconnect hints
  • Critical CSS extraction (Pro)
  • Responsive image srcset (Pro)

Set the PAGEFLARE_LICENSE environment variable to unlock Pro optimizations:

Terminal window
PAGEFLARE_LICENSE=your-key zola build && pageflare public/ --in-place

Zola static output works with any hosting provider:

pageflare processes 0 files Make sure Zola has finished building before pageflare runs. Use && (not &) to chain commands. Verify the output directory — Zola defaults to public/ but this changes with the -o flag.

CSS not minified If Zola’s Sass output is already minified via [build] config in config.toml, pageflare will still process it but savings will be minimal. Both can run safely together.

Slow builds on large sites Zola builds are fast, but pageflare’s image processing can add time for sites with thousands of images. Use --force to skip incremental caching in CI, or run with --log info to see per-phase timing.