Installing Hugo on WSL
on this page
If you develop on Windows but want a Linux toolchain, Hugo runs happily under WSL. Here is the quick version, plus the one gotcha worth knowing.
Update your package list and install from apt:
sudo apt update
sudo apt install hugo
This works, but Ubuntu and Debian package a version of Hugo that usually lags well behind the current release. Themes move quickly, and plenty of them need a newer Hugo than apt will give you. If a theme’s build complains about your Hugo version, this is why.
Grab the latest .deb straight from the Hugo releases page at github.com/gohugoio/hugo/releases, then install it. Swap the version number for whatever is current:
wget https://github.com/gohugoio/hugo/releases/download/v0.142.0/hugo_0.142.0_linux-amd64.deb
sudo dpkg -i hugo_0.142.0_linux-amd64.deb
Then check it took:
hugo version
Most modern themes, including Toha which this site runs on, need the extended build for Sass and SCSS processing. It is a separate package, so install that one instead:
wget https://github.com/gohugoio/hugo/releases/download/v0.142.0/hugo_extended_0.142.0_linux-amd64.deb
sudo dpkg -i hugo_extended_0.142.0_linux-amd64.deb
hugo version shows +extended in its output when you have the right build. If a theme fails to compile its styles, checking for that tag is the first thing to look at.