fix Netlify preview deployments

Netlify uses an old version of Hugo (0.8x) unless you tell it to use something newer. 0.8x does not support congo as a module.
pull/221/head
jkpe 2022-06-19 18:59:35 +01:00 committed by GitHub
parent 4deae8bc2f
commit 7f075d51e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -100,6 +100,9 @@ Then in the root of your site repository, create a `netlify.toml` file:
[context.production.environment] [context.production.environment]
HUGO_VERSION = "0.100.2" HUGO_VERSION = "0.100.2"
HUGO_ENV = "production" HUGO_ENV = "production"
[context.deploy-preview.environment]
HUGO_VERSION = "0.100.2"
``` ```
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`. 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`.