Hugo Overview and Installation
What Is a Static Site Generator?
A Static Site Generator (SSG) is a tool for creating websites based on static pages. It reads content and files and converts them appropriately into HTML.
You can check the available types of SSGs here. Among them, the major SSGs often used with GitHub are as follows.
-
Jekyll
- Ruby-based
- Currently the most popular (the largest number on GitHub)
- Has the most Korean reference documents
- Builds are relatively slow
- Windows is not officially supported
-
Hexo
- Node.js-based
- Has many Chinese documents
- Has many Korean reference documents
-
Hugo
- Golang-based
- Builds quickly
- Well documented
- Does not have many Korean reference documents
What Is Hugo?
Hugo is one of the static site generators, like Jekyll and Hexo, that makes it easy to create websites. It can be considered a kind of blog engine.
Pages can be written in Markdown, and many blog themes are available, so you can choose and use the theme you want.
Installing Hugo
Download and install the package for your OS from the site below.
Alternatively, refer to the site below and install it.
Installing with Homebrew on macOS
With Homebrew, the package manager for macOS, you can easily install Hugo with the following single command.
The command to install with Homebrew is as follows.
brew install hugo
Run the actual command.
% brew install hugo
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/manifests/0.104.3
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/hugo/blobs/sha256:3b355290c70c54cf0637a9ed70342d289c9f022e4d085e18cb0e4651e3bbe21b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:3b355290c70c54cf0637a9ed70342d289c9f022e4d085e18cb0e4651e3bbe21b?se=2022-10-18T23%3A
######################################################################## 100.0%
==> Pouring hugo--0.104.3.arm64_monterey.bottle.tar.gz
==> Caveats
zsh completions have been installed to:
/opt/homebrew/share/zsh/site-functions
==> Summary
🍺 /opt/homebrew/Cellar/hugo/0.104.3: 48 files, 55.8MB
==> Running `brew cleanup hugo`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
If Hugo is already installed and you want to update it to the latest version, run the following command.
% brew upgrade hugo
After installation, if you can check the version, the installation was successful.
% hugo version
hugo v0.104.3+extended darwin/arm64 BuildDate=unknown
Installing on Windows
To install Hugo on Windows, download the zip archive (hugo_extendedx0.xxx.x_windows-amd64.zip) from the Hugo Releases page and install it.
If you use features such as Sass, be careful to use a file that starts with hugo_extended.
Place the distributed hugo.exe in an appropriate directory and add it to your path to complete the installation.