summaryrefslogtreecommitdiffstats
path: root/docs/content/en/getting-started/installing.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/content/en/getting-started/installing.md')
-rw-r--r--docs/content/en/getting-started/installing.md66
1 files changed, 45 insertions, 21 deletions
diff --git a/docs/content/en/getting-started/installing.md b/docs/content/en/getting-started/installing.md
index 32e9df18e..3fd8d0a57 100644
--- a/docs/content/en/getting-started/installing.md
+++ b/docs/content/en/getting-started/installing.md
@@ -109,6 +109,7 @@ scoop install hugo-extended
#### Prerequisite Tools
* [Git][installgit]
+* [GCC][] (For Windows users only)
* [Go (at least Go 1.11)](https://golang.org/dl/)
#### Fetch from GitHub
@@ -126,7 +127,14 @@ go install --tags extended
Remove `--tags extended` if you do not want/need Sass/SCSS support.
{{% note %}}
-If you are a Windows user, substitute the `$HOME` environment variable above with `%USERPROFILE%`.
+
+##### For installation on Windows
+
+* Substitute the `$HOME` environment variable above with `%USERPROFILE%`.
+* If you install `--tags extended` version, you may encounter this error `"gcc": executable file not found in %PATH%`
+ * Please make sure you have installed `gcc` command and add it to `%PATH%`.
+ * "MinGW" is recommended, it has been tested and built successfully
+
{{% /note %}}
## macOS
@@ -289,21 +297,21 @@ If `hugo` is not in your `PATH`:
If your default shell is zsh:
- ```
- nano ~/.zprofile
- ```
-
- If your default shell is bash:
-
- ```
- nano ~/.bash_profile
- ```
+ ```
+ nano ~/.zprofile
+ ```
+
+ If your default shell is bash:
+
+ ```
+ nano ~/.bash_profile
+ ```
3. Insert a line to add `$HOME/bin` to your existing `PATH`.
- ```
- export PATH=$PATH:$HOME/bin
- ```
+ ```
+ export PATH=$PATH:$HOME/bin
+ ```
4. Save the file by pressing Control-X, then Y.
@@ -358,7 +366,7 @@ The following aims to be a complete guide to installing Hugo on your Windows PC.
{{< youtube G7umPCU-8xc >}}
-### Assumptions
+### Assumptions for Windows
1. You will use `C:\Hugo\Sites` as the starting point for your new project.
2. You will use `C:\Hugo\bin` to store executable files.
@@ -376,7 +384,12 @@ You'll need a place to store the Hugo executable, your [content][], and the gene
1. Download the latest zipped Hugo executable from [Hugo Releases][releases].
2. Extract all contents to your `..\Hugo\bin` folder.
-3. In PowerShell or your preferred CLI, add the `hugo.exe` executable to your PATH by navigating to `C:\Hugo\bin` (or the location of your hugo.exe file) and use the command `set PATH=%PATH%;C:\Hugo\bin`. If the `hugo` command does not work after a reboot, you may have to run the command prompt as administrator.
+3. Open Windows Command Line (cmd, "DOS") to add the `hugo.exe` executable to your PATH
+ * do `set PATH=%PATH%;C:\Hugo\bin` to have hugo in PATH for the currently opened cmd box
+ * do `setx PATH "%PATH%;C:\Hugo\bin"` to have hugo in PATH for every newly opened cmd box
+ * note: "setx", not "set", plus syntax 'key "val"', not 'key=val'
+
+> You may also use "Git CMD" from the [Git for Windows package](https://gitforwindows.org/) for the native Windows commands [set](https://ss64.com/nt/set.html) and [setx](https://ss64.com/nt/setx.html), but not "Git Bash", PowerShell, or any other "CLI" with different commands
### Less-technical Users
@@ -468,11 +481,15 @@ Directory of C:\hugo\sites\example.com
In any of the [Linux distributions that support snaps][snaps], you may install the "extended" Sass/SCSS version with this command:
- snap install hugo --channel=extended
+```
+snap install hugo --channel=extended
+```
To install the non-extended version without Sass/SCSS support:
- snap install hugo
+```
+snap install hugo
+```
To switch between the two, use either `snap refresh hugo --channel=extended` or `snap refresh hugo --channel=stable`.
@@ -484,7 +501,9 @@ Hugo installed via Snap can write only inside the user’s `$HOME` directory---a
[@anthonyfok](https://github.com/anthonyfok) and friends in the [Debian Go Packaging Team](https://go-team.pages.debian.net/) maintains an official hugo [Debian package](https://packages.debian.org/hugo) which is shared with [Ubuntu](https://packages.ubuntu.com/hugo) and is installable via `apt-get`:
- sudo apt-get install hugo
+```
+sudo apt-get install hugo
+```
What this installs depends on your Debian/Ubuntu version. On Ubuntu bionic (18.04), this installs the non-extended version without Sass/SCSS support. On Ubuntu disco (19.04), this installs the extended version with Sass/SCSS support.
@@ -495,14 +514,16 @@ This option is not recommended because the Hugo in Linux package managers for De
You can also install Hugo from the Arch Linux [community](https://www.archlinux.org/packages/community/x86_64/hugo/) repository. Applies also to derivatives such as Manjaro.
```
-sudo pacman -Syu hugo
+sudo pacman -S hugo
```
### Fedora, Red Hat and CentOS
Fedora maintains an [official package for Hugo](https://packages.fedoraproject.org/pkgs/hugo/hugo) which may be installed with:
- sudo dnf install hugo
+```
+sudo dnf install hugo
+```
For the latest version, the Hugo package maintained by [@daftaupe](https://github.com/daftaupe) at Fedora Copr is recommended:
@@ -530,7 +551,9 @@ sudo eopkg install hugo
OpenBSD provides a package for Hugo via `pkg_add`:
- doas pkg_add hugo
+```
+doas pkg_add hugo
+```
## Upgrade Hugo
@@ -551,6 +574,7 @@ Now that you've installed Hugo, read the [Quick Start guide][quickstart] and exp
[dep]: https://github.com/golang/dep
[highlight shortcode]: /content-management/shortcodes/#highlight
[installgit]: https://git-scm.com/
+[GCC]: http://www.mingw.org/
[installgo]: https://golang.org/dl/
[linuxbrew]: https://docs.brew.sh/Homebrew-on-Linux
[quickstart]: /getting-started/quick-start/