Skip to content

Commit

Permalink
chore: synchronize Hugo versions on local, GH Action, Netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
jhrcook committed Apr 21, 2024
1 parent 441056d commit fe333eb
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
HUGO_VERSION: 0.124.1
steps:
- name: Install Hugo CLI
run: |
Expand Down
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,45 @@ To-Do:
- [ ] Move over Projects
- [ ] Add CV somewhere
- [ ] Add text to "About" page

---

## Notes

### Initial creation

Steps for creating website:

```bash
hugo new site jhrcook-website
cd jhrcook-website
git init
```

Blowfish theme:

```bash
git submodule add -b main https://github.com/nunocoracao/blowfish.git themes/blowfish

```

### Updating

#### Blowfish theme

For updating ([instructions](https://blowfish.page/docs/installation/#installing-updates))

```bash
git submodule update --remote --merge
```

Can find the maximum Hugo version in the file [./themes/blowfish/config.toml](./themes/blowfish/config.toml).

Can then install this version of Hugo with the following steps:

1. Download the release from here: <https://github.com/gohugoio/hugo/releases>
2. Extract
3. Move the `hugo` executable to `~/.local/bin/`
4. May need to all use of the downloaded binary in System Settings/Security

Finally, set the desired version of Hugo in the [netlify.toml](./netlify.toml) and GitHub Actions [workflow](.github/workflows/gh-pages.yaml)
20 changes: 10 additions & 10 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[build]
command = "hugo --gc --minify -b $URL"
publish = "public"
command = "hugo --gc --minify -b $URL"
publish = "public"

[build.environment]
HUGO_VERSION = "0.111.3"
HUGO_ENABLEGITINFO = "true"
HUGO_VERSION = "0.124.1"
HUGO_ENABLEGITINFO = "true"

[context.production.environment]
HUGO_ENV = "production"
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[[plugins]]
package = "netlify-plugin-hugo-cache-resources"
[plugins.inputs]
debug = true
package = "netlify-plugin-hugo-cache-resources"
[plugins.inputs]
debug = true

0 comments on commit fe333eb

Please sign in to comment.