❄️ Installing Older Versions of `hugo`
Installing a previous version of hugo via brew is not as easy as installing the latest version.
Steps
- Clone the latest repository of the software that you require. I need an older version of
hugoand it usesgoso I will be building that from source.
git clone git@github.com:gohugoio/hugo.git
- Navigate to the directory
cd hugo
- Checkout to the version of
hugothat you require e.g. versionv0.113.0is atSHA5of085c1b3d614e23d218ebf9daad909deaa2390c9a.
hugo checkout 085c1b3d614e23d218ebf9daad909deaa2390c9a
- Install
goand build the package
# install go
brew install go
# build package from source
go build
- Copy
hugofile to yourPATH
# On Mac
sudo cp hugo /usr/local/bin
- Assert that the installed version of
hugois the one you require.
hugo version
hugo v0.113.0-085c1b3d614e23d218ebf9daad909deaa2390c9a darwin/arm6
- Never touch it again.