Update macOS tarball installation instructions (#1203)

Closes #1202
This commit is contained in:
Joe Mooring authored and GitHub committed 2020-09-02 06:07:43 -04:00
1 parent 2e701f8f38
commit cf87a5da2c
1 file changed
+21 -5
+21 -5
View File
@@ -261,7 +261,7 @@ Archive: hugo_X.Y_osx-64bit.tgz
Hugo Static Site Generator v0.13 BuildDate: 2015-02-22T04:02:30-06:00 Hugo Static Site Generator v0.13 BuildDate: 2015-02-22T04:02:30-06:00
``` ```
You may need to add your bin directory to your `PATH` variable. The `which` command will check for us. If it can find `hugo`, it will print the full path to it. Otherwise, it will not print anything. You may need to add your bin directory to your `PATH` environment variable. The `which` command will check for us. If it can find `hugo`, it will print the full path to it. Otherwise, it will not print anything.
``` ```
# check if hugo is in the path # check if hugo is in the path
@@ -269,21 +269,37 @@ which hugo
/Users/USERNAME/bin/hugo /Users/USERNAME/bin/hugo
``` ```
If `hugo` is not in your `PATH`, add it by updating your `~/.bash_profile` file. First, start up an editor: If `hugo` is not in your `PATH`:
1. Determine your default shell (zsh or bash).
```
echo $SHELL
```
2. Edit your profile.
If your default shell is zsh:
```
nano ~/.zprofile
```
If your default shell is bash:
``` ```
nano ~/.bash_profile nano ~/.bash_profile
``` ```
Add a line to update your `PATH` variable: 3. Insert a line to add `$HOME/bin` to your existing `PATH`.
``` ```
export PATH=$PATH:$HOME/bin export PATH=$PATH:$HOME/bin
``` ```
Then save the file by pressing Control-X, then Y to save the file and return to the prompt. 4. Save the file by pressing Control-X, then Y.
Close the terminal and open a new terminal to pick up the changes to your profile. Verify your success by running the `which hugo` command again. 5. Close the terminal and open a new terminal to pick up the changes to your profile. Verify the change by running the `which hugo` command again.
You've successfully installed Hugo. You've successfully installed Hugo.