diff options
Diffstat (limited to 'docs/content/en/installation')
-rw-r--r-- | docs/content/en/installation/_index.md | 15 | ||||
-rw-r--r-- | docs/content/en/installation/bsd.md | 79 | ||||
-rw-r--r-- | docs/content/en/installation/common/01-editions.md | 8 | ||||
-rw-r--r-- | docs/content/en/installation/common/02-prerequisites.md | 27 | ||||
-rw-r--r-- | docs/content/en/installation/common/03-prebuilt-binaries.md | 21 | ||||
-rw-r--r-- | docs/content/en/installation/common/04-docker.md | 10 | ||||
-rw-r--r-- | docs/content/en/installation/common/05-build-from-source.md | 20 | ||||
-rw-r--r-- | docs/content/en/installation/common/homebrew.md | 9 | ||||
-rw-r--r-- | docs/content/en/installation/common/index.md | 3 | ||||
-rw-r--r-- | docs/content/en/installation/linux.md | 125 | ||||
-rw-r--r-- | docs/content/en/installation/macos.md | 48 | ||||
-rw-r--r-- | docs/content/en/installation/windows.md | 63 |
12 files changed, 428 insertions, 0 deletions
diff --git a/docs/content/en/installation/_index.md b/docs/content/en/installation/_index.md new file mode 100644 index 000000000..e5a34b1f2 --- /dev/null +++ b/docs/content/en/installation/_index.md @@ -0,0 +1,15 @@ +--- +title: Installation +linkTitle: Installation overview +description: Install Hugo on macOS, Linux, Windows, BSD, and on any machine that can run the Go compiler tool chain. +aliases: [/getting-started/installing/] +categories: [installation] +keywords: [installation] +menu: + docs: + parent: installation + weight: 10 +toc: false +--- + +{{% param "description" %}} diff --git a/docs/content/en/installation/bsd.md b/docs/content/en/installation/bsd.md new file mode 100644 index 000000000..f17b64085 --- /dev/null +++ b/docs/content/en/installation/bsd.md @@ -0,0 +1,79 @@ +--- +title: BSD +linkTitle: BSD +description: Install Hugo on BSD derivatives. +categories: [installation] +menu: + docs: + parent: installation + weight: 50 +toc: true +weight: 50 +--- +{{% readfile file="/installation/common/01-editions.md" %}} + +{{% readfile file="/installation/common/02-prerequisites.md" %}} + +{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}} + +## Repository packages + +Most BSD derivatives maintain a repository for commonly installed applications. Please note that these repositories may not contain the [latest release]. + +[latest release]: https://github.com/gohugoio/hugo/releases/latest + +### DragonFly BSD + +[DragonFly BSD] includes Hugo in its package repository. This will install the extended edition of Hugo: + +```sh +sudo pkg install gohugo +``` + +[DragonFly BSD]: https://www.dragonflybsd.org/ + +### FreeBSD + +[FreeBSD] includes Hugo in its package repository. This will install the extended edition of Hugo: + +```sh +sudo pkg install gohugo +``` + +[FreeBSD]: https://www.freebsd.org/ + +### NetBSD + +[NetBSD] includes Hugo in its package repository. This will install the extended edition of Hugo: + +```sh +sudo pkgin install go-hugo +``` + +[NetBSD]: https://www.netbsd.org/ + +### OpenBSD + +[OpenBSD] includes Hugo in its package repository. This will prompt you to select which edition of Hugo to install: + +```sh +doas pkg_add hugo +``` + +[OpenBSD]: https://www.openbsd.org/ + +{{% readfile file="/installation/common/04-docker.md" %}} + +{{% readfile file="/installation/common/05-build-from-source.md" %}} + +## Comparison + +||Prebuilt binaries|Repository packages|Docker|Build from source +:--|:--:|:--:|:--:|:--: +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| +Easy to upgrade?|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark: +Easy to downgrade?|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark: +Automatic updates?|:x:|varies|:x: [^1]|:x: +Latest version available?|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark: + +[^1]: Possible but requires advanced configuration. diff --git a/docs/content/en/installation/common/01-editions.md b/docs/content/en/installation/common/01-editions.md new file mode 100644 index 000000000..ee9f3ff93 --- /dev/null +++ b/docs/content/en/installation/common/01-editions.md @@ -0,0 +1,8 @@ +## Editions + +Hugo is available in two editions: standard and extended. With the extended edition you can: + +- Encode WebP images (you can decode WebP images with both editions) +- Transpile Sass to CSS using the embedded LibSass transpiler + +We recommend that you install the extended edition. diff --git a/docs/content/en/installation/common/02-prerequisites.md b/docs/content/en/installation/common/02-prerequisites.md new file mode 100644 index 000000000..008370825 --- /dev/null +++ b/docs/content/en/installation/common/02-prerequisites.md @@ -0,0 +1,27 @@ +## Prerequisites + +Although not required in all cases, Git and Go are often used when working with Hugo. + +Git is required to: + +- Use the [Hugo Modules] feature +- Build Hugo from source +- Install a theme as a Git submodule +- Access [commit information] from a local Git repository +- Host your site with services such as [AWS Amplify], [CloudCannon], [Cloudflare Pages], [GitHub Pages], [GitLab Pages], and [Netlify]. + +Go is required to: + +- Use the Hugo Modules feature +- Build Hugo from source + +Please refer to the [Git] and [Go] documentation for installation instructions. + +[AWS Amplify]: https://aws.amazon.com/amplify/ +[CloudCannon]: https://cloudcannon.com/ +[Cloudflare Pages]: https://pages.cloudflare.com/ +[Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git +[GitHub Pages]: https://pages.github.com/ +[GitLab Pages]: https://docs.gitlab.com/ee/user/project/pages/ +[Go]: https://go.dev/doc/install +[Netlify]: https://www.netlify.com/ diff --git a/docs/content/en/installation/common/03-prebuilt-binaries.md b/docs/content/en/installation/common/03-prebuilt-binaries.md new file mode 100644 index 000000000..f821f79a2 --- /dev/null +++ b/docs/content/en/installation/common/03-prebuilt-binaries.md @@ -0,0 +1,21 @@ +## Prebuilt binaries + +Prebuilt binaries are available for a variety of operating systems and architectures. Visit the [latest release] page, and scroll down to the Assets section. + +<!-- markdownlint-disable-next-line MD051 --> +1. Download the archive for the desired [edition], operating system, and architecture +1. Extract the archive +1. Move the executable to the desired directory +1. Add this directory to the PATH environment variable +1. Verify that you have _execute_ permission on the file + +Please consult your operating system documentation if you need help setting file permissions or modifying your PATH environment variable. + +If you do not see a prebuilt binary for the desired edition, operating system, and architecture, install Hugo using one of the methods described below. + +[commit information]: https://gohugo.io/variables/git +[edition]: #editions +[Git]: https://git-scm.com/ +[Go]: https://go.dev/ +[Hugo Modules]: /hugo-modules/ +[latest release]: https://github.com/gohugoio/hugo/releases/latest diff --git a/docs/content/en/installation/common/04-docker.md b/docs/content/en/installation/common/04-docker.md new file mode 100644 index 000000000..24f5cd942 --- /dev/null +++ b/docs/content/en/installation/common/04-docker.md @@ -0,0 +1,10 @@ +## Docker + +[Erlend Klakegg Bergheim] graciously maintains [Docker images] based on images for Alpine Linux, Busybox, Debian, and Ubuntu. + +```sh +docker pull klakegg/hugo +``` + +[Docker images]: https://hub.docker.com/r/klakegg/hugo +[Erlend Klakegg Bergheim]: https://github.com/klakegg diff --git a/docs/content/en/installation/common/05-build-from-source.md b/docs/content/en/installation/common/05-build-from-source.md new file mode 100644 index 000000000..a135de9fd --- /dev/null +++ b/docs/content/en/installation/common/05-build-from-source.md @@ -0,0 +1,20 @@ +## Build from source + +To build Hugo from source you must: + +1. Install [Git] +1. Install [Go] version 1.18 or later +1. Update your PATH environment variable as described in the [Go documentation] + +> The install directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\go). + +Then build and test: + +```sh +go install -tags extended github.com/gohugoio/hugo@latest +hugo version +``` + +[Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git +[Go]: https://go.dev/doc/install +[Go documentation]: https://go.dev/doc/code#Command diff --git a/docs/content/en/installation/common/homebrew.md b/docs/content/en/installation/common/homebrew.md new file mode 100644 index 000000000..7178a9f4f --- /dev/null +++ b/docs/content/en/installation/common/homebrew.md @@ -0,0 +1,9 @@ +### Homebrew + +[Homebrew] is a free and open source package manager for macOS and Linux. This will install the extended edition of Hugo: + +```sh +brew install hugo +``` + +[Homebrew]: https://brew.sh/ diff --git a/docs/content/en/installation/common/index.md b/docs/content/en/installation/common/index.md new file mode 100644 index 000000000..cbb7365a6 --- /dev/null +++ b/docs/content/en/installation/common/index.md @@ -0,0 +1,3 @@ ++++ +headless = true ++++ diff --git a/docs/content/en/installation/linux.md b/docs/content/en/installation/linux.md new file mode 100644 index 000000000..03ffe9430 --- /dev/null +++ b/docs/content/en/installation/linux.md @@ -0,0 +1,125 @@ +--- +title: Linux +linkTitle: Linux +description: Install Hugo on Linux. +categories: [installation] +menu: + docs: + parent: installation + weight: 30 +toc: true +weight: 30 +--- +{{% readfile file="/installation/common/01-editions.md" %}} + +{{% readfile file="/installation/common/02-prerequisites.md" %}} + +{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}} + +## Package managers + +### Snap + +[Snap] is a free and open source package manager for Linux. Available for [most distributions], Snap packages are simple to install and are automatically updated. This will install the extended edition of Hugo: + +```sh +sudo snap install hugo +``` + +[most distributions]: https://snapcraft.io/docs/installing-snapd +[Snap]: https://snapcraft.io/ + +{{% readfile file="/installation/common/homebrew.md" %}} + +## Repository packages + +Most Linux distributions maintain a repository for commonly installed applications. Please note that these repositories may not contain the [latest release]. + +[latest release]: https://github.com/gohugoio/hugo/releases/latest + +### Arch Linux + +Derivatives of the [Arch Linux] distribution of Linux include [EndeavourOS], [Garuda Linux], [Manjaro], and others. This will install the extended edition of Hugo: + +```sh +sudo pacman -S hugo +``` + +[Arch Linux]: https://archlinux.org/ +[EndeavourOS]: https://endeavouros.com/ +[Manjaro]: https://manjaro.org/ +[Garuda Linux]: https://garudalinux.org/ + +### Debian + +Derivatives of the [Debian] distribution of Linux include [elementary OS], [KDE neon], [Linux Lite], [Linux Mint], [MX Linux], [Pop!_OS], [Ubuntu], [Zorin OS], and others. This will install the extended edition of Hugo: + +```sh +sudo apt install hugo +``` + +You can also download Debian packages from the [latest release] page. + +[Debian]: https://www.debian.org/ +[elementary OS]: https://elementary.io/ +[KDE neon]: https://neon.kde.org/ +[Linux Lite]: https://www.linuxliteos.com/ +[Linux Mint]: https://linuxmint.com/ +[MX Linux]: https://mxlinux.org/ +[Pop!_OS]: https://pop.system76.com/ +[Ubuntu]: https://ubuntu.com/ +[Zorin OS]: https://zorin.com/os/ + +### Fedora + +Derivatives of the [Fedora] distribution of Linux include [CentOS], [Red Hat Enterprise Linux], and others. This will install the extended edition of Hugo: + + +```sh +sudo dnf install hugo +``` + +[CentOS]: https://www.centos.org/ +[Fedora]: https://getfedora.org/ +[Red Hat Enterprise Linux]: https://www.redhat.com/ + +### openSUSE + +Derivatives of the [openSUSE] distribution of Linux include [GeckoLinux], [Linux Karmada], and others. This will install the extended edition of Hugo: + + +```sh +sudo zypper install hugo +``` + +[GeckoLinux]: https://geckolinux.github.io/ +[Linux Karmada]: https://linuxkamarada.com/ +[openSUSE]: https://www.opensuse.org/ + +### Solus + +The [Solus] distribution of Linux includes Hugo in its package repository. This will install the _standard_ edition of Hugo: + +```sh +sudo eopkg install hugo +``` + +[Solus]: https://getsol.us/home/ + +{{% readfile file="/installation/common/04-docker.md" %}} + +{{% readfile file="/installation/common/05-build-from-source.md" %}} + +## Comparison + +||Prebuilt binaries|Package managers|Repository packages|Docker|Build from source +:--|:--:|:--:|:--:|:--:|:--: +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark: +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark: +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|varies|:heavy_check_mark:|:heavy_check_mark: +Automatic updates?|:x:|varies [^2]|:x:|:x: [^3]|:x: +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|varies|:heavy_check_mark:|:heavy_check_mark: + +[^1]: Easy if a previous version is still installed. +[^2]: Snap packages are automatically updated. Homebrew requires advanced configuration. +[^3]: Possible but requires advanced configuration. diff --git a/docs/content/en/installation/macos.md b/docs/content/en/installation/macos.md new file mode 100644 index 000000000..c614f39ba --- /dev/null +++ b/docs/content/en/installation/macos.md @@ -0,0 +1,48 @@ +--- +title: macOS +linkTitle: macOS +description: Install Hugo on macOS. +categories: [installation] +menu: + docs: + parent: installation + weight: 20 +toc: true +weight: 20 +--- +{{% readfile file="/installation/common/01-editions.md" %}} + +{{% readfile file="/installation/common/02-prerequisites.md" %}} + +{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}} + +## Package managers + +{{% readfile file="/installation/common/homebrew.md" %}} + +### MacPorts + +[MacPorts] is a free and open source package manager for macOS. This will install the extended edition of Hugo: + +```sh +sudo port install hugo +``` + +[MacPorts]: https://www.macports.org/ + +{{% readfile file="/installation/common/04-docker.md" %}} + +{{% readfile file="/installation/common/05-build-from-source.md" %}} + +## Comparison + +||Prebuilt binaries|Package managers|Docker|Build from source +:--|:--:|:--:|:--:|:--:|:--: +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark: +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^1]|:heavy_check_mark:|:heavy_check_mark: +Automatic updates?|:x:|:x: [^2]|:x: [^2]|:x: +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark: + +[^1]: Easy if a previous version is still installed. +[^2]: Possible but requires advanced configuration. diff --git a/docs/content/en/installation/windows.md b/docs/content/en/installation/windows.md new file mode 100644 index 000000000..6ef17acd4 --- /dev/null +++ b/docs/content/en/installation/windows.md @@ -0,0 +1,63 @@ +--- +title: Windows +linkTitle: Windows +description: Install Hugo on Windows. +categories: [installation] +menu: + docs: + parent: installation + weight: 40 +toc: true +weight: 40 +--- +{{% readfile file="/installation/common/01-editions.md" %}} + +{{% readfile file="/installation/common/02-prerequisites.md" %}} + +{{% readfile file="/installation/common/03-prebuilt-binaries.md" %}} + +## Package managers + +### Chocolatey + +[Chocolatey] is a free and open source package manager for Windows. This will install the extended edition of Hugo: + +```sh +choco install hugo-extended +``` + +[Chocolatey]: https://chocolatey.org/ + +### Scoop + +[Scoop] is a free and open source package manager for Windows. This will install the extended edition of Hugo: + +```sh +scoop install hugo-extended +``` + +[Scoop]: https://scoop.sh/ + +{{% readfile file="/installation/common/04-docker.md" %}} + +{{% readfile file="/installation/common/05-build-from-source.md" %}} + +{{% note %}} +When building the extended edition of Hugo from source on Windows, you will also need to install the [GCC compiler]. See these [detailed instructions]. + +[detailed instructions]: https://discourse.gohugo.io/t/41370 +[GCC compiler]: https://gcc.gnu.org/ +{{% /note %}} + +## Comparison + +||Prebuilt binaries|Package managers|Docker|Build from source +:--|:--:|:--:|:--:|:--:|:--: +Easy to install?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| +Easy to upgrade?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark: +Easy to downgrade?|:heavy_check_mark:|:heavy_check_mark: [^2]|:heavy_check_mark:|:heavy_check_mark: +Automatic updates?|:x:|:x: [^1]|:x: [^1]|:x: +Latest version available?|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark: + +[^1]: Possible but requires advanced configuration. +[^2]: Easy if a previous version is still installed. |