Instructions on how to install the hugo
static site generator.
hugo
can be obtained here. Copy the link for the version that you want to install from there.
Get the hugo
archive and extract it with the following command:
curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v0.93.2/hugo_0.93.2_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
To install the latest version use the following commands instead:
hugo_version="$(curl --silent --location --retry 3 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
hugo
can be obtained here. Copy the link for the version that you want to install from there.
Get the hugo
archive and extract it with the following command:
curl --silent --location --retry 3 'https://github.com/gohugoio/hugo/releases/download/v0.93.2/hugo_extended_0.93.2_macOS-64bit.tar.gz' | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
To install the latest version use the following commands instead:
hugo_version="$(curl --silent --location --retry 3 'https://api.github.com/repos/gohugoio/hugo/releases/latest' | sed -E -n '/tag_name/ s/.*v([0-9.]+).*",/\1/p')"
curl --silent --location --retry 3 "https://github.com/gohugoio/hugo/releases/download/v${hugo_version}/hugo_extended_${hugo_version}_macOS-64bit.tar.gz" | sudo tar xz --no-same-owner --strip-components=0 -C /usr/local/bin/ hugo
Run the following command on a terminal window:
hugo version