Install Zola Static Site Generator on Ubuntu 24.04

Install Zola Static Site Generator on Ubuntu 24.04

Zola is a modern static site generator that allows users to build fast, customizable websites without the need for a traditional database-driven backend. This tutorial explains how to install Zola static site generator on Ubuntu 24.04.

Install Zola

Look up the current Zola version on GitHub repository and assign it to a variable:

ZOLA_VERSION=$(curl -s "https://api.github.com/repos/getzola/zola/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')

Utilize the previously identified version to download the Zola archive:

wget -qO zola.tar.gz https://github.com/getzola/zola/releases/latest/download/zola-v$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz

Extract executable to /usr/local/bin directory:

sudo tar xf zola.tar.gz -C /usr/local/bin zola

We can verify the Zola version using the following command:

zola --version

Delete the unnecessary archive file:

rm -rf zola.tar.gz

Testing Zola

Initialize site by running a command zola init with directory name. Example:

zola init myblog

You'll be asked with a few questions. You can press Enter to accept the default values for each. The myblog directory will be created. Navigate to new directory and create simple index.html file:

cd myblog
echo '<!DOCTYPE html><html><head><title>Title</title></head><body>Hello world</body></html>' > templates/index.html

Start the Zola development server:

zola serve

Open a web browser and go to http://<IP_ADDRESS>:1111, where <IP_ADDRESS> is the IP address of the system. A newly created page will appear.

Uninstall Zola

To remove Zola, delete the associated file:

sudo rm -rf /usr/local/bin/zola

Leave a Comment

Cancel reply

Your email address will not be published.