This evening I was experimenting with static site generators. I’ve been using Jekyll for a while, but I wanted to see what other options were available. I decided to give Hugo a try, since I heard it’s very fast and some of the themes are really nice. Hugo is written in Go, so it’s a single binary that you download and run, which generally makes it easier to install than something like Jekyll, which requires Ruby and quite a few other dependencies.
As I run Arch Linux on my desktop, I’ll show you how to get it up and running on Arch Linux in just a couple of minutes.
Installation
Installing Hugo on Arch Linux is straightforward using pacman:
That’s it! To verify the installation:
At the time of this writing, the version that was installed on my Arch Linux system was as follows:
Quick Start
Let’s create a new site:
Add a theme (using PaperMod as an example):
Enable the theme by adding the following line to the end of hugo.toml
:
By this point, your hugo.toml
file should look like this:
Create your first post:
Start the Hugo development server:
Visit http://localhost:1313 to see your new site!
Here’s a screenshot of what the site looks like for me:
My system is set to dark mode, so the theme is styled accordingly. There’s a theme toggle next to the logo in the top left.
That’s all there is to it. Hugo is now installed and ready for you to start creating content. The -D
flag tells Hugo to include draft posts in the preview.
For more information about Hugo’s features and capabilities, check out the official documentation.
Comments