Deploy a Zola site
is a fast static site generator in a single binary with everything built-in. In this guide, you will create a new Zola application and deploy it using Cloudflare Pages. You will use the
zola CLI to create a new Zola site.
$ brew install zola
$ choco install zola
$ scoop install zola
Your Linux distro’s package manager may include Zola. If this is the case, you can install it directly using your distro’s package manager – for example, using
pkg, run the following command in your terminal:
$ pkg install zola
Creating a new project
With Zola installed, create a new project by running the
zola init command in your terminal using the default template:
$ zola init my-zola-project
zola init, you will prompted with three questions:
Do you want to enable Sass compilation? [Y/n]: Y
Do you want to enable syntax highlighting? [y/N]: y
Do you want to build a search index of the content? [y/N]: y
Before you continue
Creating a GitHub repository
$ git remote add origin https://github.com/yourgithubusername/githubrepo$ git branch -M main$ git push -u origin main
Deploying with Cloudflare Pages
Deploy your site to Pages by logging in to the > Account Home > Pages and selecting Create a project. Select the new GitHub repository that you created and, in the Set up builds and deployments section, provide the following information:
Below the configuration, make sure to set the Environment Variables (advanced) for specifying the
After configuring your site, you can begin your first deploy. You should see Cloudflare Pages installing
zola, your project dependencies, and building your site, before deploying it.
After deploying your site, you will receive a unique subdomain for your project on
You can now add that subdomain as the
base_url in your
# The URL the site will be built forbase_url = "https://my-zola-project.pages.dev"
Every time you commit new code to your Zola site, Cloudflare Pages will automatically rebuild your project and deploy it. You will also get access to on new pull requests, so you can preview how changes look to your site before deploying them to production.