Skip to content

Commit

Permalink
fix (#1302): Update troubleshooting steps for hugo "key kind not allo…
Browse files Browse the repository at this point in the history
…wed" error (#1312)

* Update troubleshooting steps for new hugo "key kind not allowed" error

* add hugo version pinning to troubleshooting
  • Loading branch information
mrjones-plip authored Mar 19, 2024
1 parent 4fad484 commit 0a616ac
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ If using `asdf` fails you can try installing Hugo manually. To install, follow t
1. Preview your site in your browser at: http://localhost:1313/
1. As you make changes to the site, your browser will automatically reload your local dev site so you can easily and quickly see your changes.

MacOS users getting errors when running `hugo server`, please see our [Troubleshooting guide](./troubleshooting.md).
Any users who experience errors running `hugo server`, please see our [Troubleshooting guide](./troubleshooting.md).

## Link Checking [Optional]

Expand Down
17 changes: 14 additions & 3 deletions troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Troubleshooting

The first thing to check, regardless of your OS, is that you are running the latest version of Hugo and that it's the Extended version. You can do this by running the following command...
The first thing to check, regardless of your OS, is that you are running the correct version of Hugo and that it's the Extended version:

```shell
hugo version
```

...which should return something like:
This will show something like:


```shell
Expand All @@ -17,6 +17,17 @@ In this example, `0.108.0` is the release and `+extended` indicates that it is t

You can see the list of Hugo releases [here](https://github.com/gohugoio/hugo/releases).

## Which `hugo` version to run

There's currently an [issue running versions later than `0.123` or later](https://github.com/medic/cht-docs/issues/1302). You should run `0.122` to avoid the error until this issue is fixed. Follow these steps to install the older `0.122` version. While they mention `snap` which is specific to Linux, the install steps should work for macOS and Windows with WSL 2 as well:

1. Remove the too new verison of `hugo`. If you used `snap`, you can uninstall with: `sudo snap remove hugo`
2. Download the specific `hugo` tarball: `wget https://github.com/gohugoio/hugo/releases/download/v0.122.0/hugo_extended_0.122.0_linux-amd64.tar.gz`
3. Uncompressed it: `tar xvzf hugo_extended_0.122.0_linux-amd64.tar.gz`
4. Move the binary into your `$PATH`: `sudo mv hugo /usr/local/bin`

If you were running the `snap` version of `hugo`, you may need to install `go` now as it was removed with `hugo`. This should work with `sudo snap install go`. Other platforms that need to install Go should see their [install docs](https://golang.org/doc/install).


## MacOS

Expand Down Expand Up @@ -58,4 +69,4 @@ MacOS M1 users encountering `Error: Error building site: POSTCSS: failed to tran

```shell
npm install postcss-cli
```
```

0 comments on commit 0a616ac

Please sign in to comment.