Back to Hugo

04 Build From Source

docs/content/en/_common/installation/04-build-from-source.md

0.162.11.1 KB
Original Source

Build from source

To build Hugo from source you must install:

  1. Git
  2. Go version 1.25.0 or later

Standard edition

To build and install the standard edition:

sh
CGO_ENABLED=0 go install github.com/gohugoio/hugo@latest

Deploy edition

{{< new-in v0.159.2 />}}

To build and install the deploy edition:

sh
CGO_ENABLED=0 go install -tags withdeploy github.com/gohugoio/hugo@latest

Extended edition

To build and install the extended edition, first install a C compiler such as GCC or Clang and then run the following command:

sh
CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest

Extended/deploy edition

To build and install the extended/deploy edition, first install a C compiler such as GCC or Clang and then run the following command:

sh
CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest