Skip to content

Commit

Permalink
🎨 Remove redundant HUGO_VERSION var in Netlify config
Browse files Browse the repository at this point in the history
  • Loading branch information
jpanther committed Sep 10, 2023
1 parent f34a827 commit 1e90d7f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
5 changes: 1 addition & 4 deletions exampleSite/content/docs/hosting-deployment/index.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,13 @@ jobs:
publish = "public"
[build.environment]
HUGO_VERSION = "0.118.2"
NODE_ENV = "production"
GO_VERSION = "1.20"
TZ = "UTC" # Set to preferred timezone
[context.production.environment]
HUGO_VERSION = "0.112.7"
HUGO_ENV = "production"
[context.deploy-preview.environment]
HUGO_VERSION = "0.112.7"
```

上の例は、CongoをHugoモジュールとしてデプロイすることを想定しています。別の方法でテーマをインストールした場合は、ビルドコマンドを `hugo --gc --minify -b $URL` に変更してください。
Expand Down
5 changes: 1 addition & 4 deletions exampleSite/content/docs/hosting-deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,13 @@ Then in the root of your site repository, create a `netlify.toml` file:
publish = "public"
[build.environment]
HUGO_VERSION = "0.118.2"
NODE_ENV = "production"
GO_VERSION = "1.20"
TZ = "UTC" # Set to preferred timezone
[context.production.environment]
HUGO_VERSION = "0.112.7"
HUGO_ENV = "production"
[context.deploy-preview.environment]
HUGO_VERSION = "0.112.7"
```

This configuration assumes you are deploying Congo as a Hugo module. If you have installed the theme using another method, change the build command to simply `hugo --gc --minify -b $URL`.
Expand Down
8 changes: 1 addition & 7 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,16 @@
publish = "exampleSite/public"

[build.environment]
HUGO_VERSION = "0.118.2"
HUGO_THEMESDIR = "../.."
HUGO_THEME = "repo"
TZ = "Australia/Melbourne"

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

[context.deploy-preview]
command = "cd exampleSite && hugo --gc --minify -D -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.112.7"

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

[context.branch-deploy.environment]
HUGO_VERSION = "0.112.7"

0 comments on commit 1e90d7f

Please sign in to comment.