Mention MacPorts also on the Installing page (#1215)

* Add instructions for using Macports

Fix for #688, rewrite the text so it's clear that either MacPorts or Homebrew can be used to install Hugo.

* Add MacPorts to Getting Started page

* Update Pick Your Method section to include MacPorts
This commit is contained in:
Jørn Åne 2020-09-06 00:00:21 +02:00 committed by GitHub
parent 0ae8f5c19c
commit 5cd9ca4b23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,6 +58,14 @@ brew install hugo
For more detailed explanations, read the installation guides that follow for installing on macOS and Windows. For more detailed explanations, read the installation guides that follow for installing on macOS and Windows.
### MacPorts (macOS)
If you are on macOS and using [MacPorts][macports], you can install Hugo with the following one-liner:
{{< code file="install-with-macports.sh" >}}
port install hugo
{{< /code >}}
### Homebrew (Linux) ### Homebrew (Linux)
If you are using [Homebrew][linuxbrew] on Linux, you can install Hugo with the following one-liner: If you are using [Homebrew][linuxbrew] on Linux, you can install Hugo with the following one-liner:
@ -133,7 +141,7 @@ If you are a Windows user, substitute the `$HOME` environment variable above wit
There are three ways to install Hugo on your Mac There are three ways to install Hugo on your Mac
1. The [Homebrew][brew] `brew` utility 1. A package manager, like [Homebrew][brew] (`brew`) or [MacPorts][macports] (`port`)
2. Distribution (i.e., tarball) 2. Distribution (i.e., tarball)
3. Building from Source 3. Building from Source
@ -143,7 +151,7 @@ There is no "best" way to install Hugo on your Mac. You should use the method th
There are pros and cons to each of the aforementioned methods: There are pros and cons to each of the aforementioned methods:
1. **Homebrew.** Homebrew is the simplest method and will require the least amount of work to maintain. The drawbacks aren't severe. The default package will be for the most recent release, so it will not have bug fixes until the next release (i.e., unless you install it with the `--HEAD` option). Hugo `brew` releases may lag a few days behind because it has to be coordinated with another team. Nevertheless, `brew` is the recommended installation method if you want to work from a stable, widely used source. Brew works well and is easy to update. 1. **Package Manager.** Using a package manager is the simplest method and will require the least amount of work to maintain. The drawbacks aren't severe. The default package will be for the most recent release, so it will not have bug fixes until the next release (i.e., unless you install it with the `--HEAD` option in Homebrew). Releases may lag a few days behind because it has to be coordinated with another team. Nevertheless, this is the recommended installation method if you want to work from a stable, widely used source. Package managers work well and they are easy to update.
2. **Tarball.** Downloading and installing from the tarball is also easy, although it requires a few more command line skills than does Homebrew. Updates are easy as well: you just repeat the process with the new binary. This gives you the flexibility to have multiple versions on your computer. If you don't want to use `brew`, then the tarball/binary is a good choice. 2. **Tarball.** Downloading and installing from the tarball is also easy, although it requires a few more command line skills than does Homebrew. Updates are easy as well: you just repeat the process with the new binary. This gives you the flexibility to have multiple versions on your computer. If you don't want to use `brew`, then the tarball/binary is a good choice.
@ -532,6 +540,7 @@ Upgrading Hugo is as easy as downloading and replacing the executable youve p
Now that you've installed Hugo, read the [Quick Start guide][quickstart] and explore the rest of the documentation. If you have questions, ask the Hugo community directly by visiting the [Hugo Discussion Forum][forum]. Now that you've installed Hugo, read the [Quick Start guide][quickstart] and explore the rest of the documentation. If you have questions, ask the Hugo community directly by visiting the [Hugo Discussion Forum][forum].
[brew]: https://brew.sh/ [brew]: https://brew.sh/
[macports]: https://www.macports.org/
[Chocolatey]: https://chocolatey.org/ [Chocolatey]: https://chocolatey.org/
[content]: /content-management/ [content]: /content-management/
[@dhersam]: https://github.com/dhersam [@dhersam]: https://github.com/dhersam