diff --git a/Makefile b/Makefile index d1b5667..7a50e74 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,10 @@ build: hugo --destination public +.PHONY: build-draft +build-draft: + hugo --environment development --buildDrafts --buildFuture --buildExpired --destination public + .PHONY: build-openring build-openring: ./bin/openring-create --input assets/templates/openring-input.html --output layouts/partials/openring.html diff --git a/netlify.toml b/netlify.toml index 03a2586..7fb101f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,15 +1,14 @@ [build] publish = "public/" -command = "make build" +command = "make build -e" [context.production.environment] -HUGO_BASE_URL = "$DEPLOY_URL" +HUGO_BASEURL = "$DEPLOY_URL" -[context.branch-deploy.environment] -HUGO_BASE_URL = "$DEPLOY_PRIME_URL" +[context.branch-deploy] +command = "make build-draft -e" +environment.HUGO_BASEURL = "$DEPLOY_PRIME_URL" [context.deploy-preview] -command = "hugo --buildDrafts --buildFuture --buildExpired" - -[context.deploy-preview.environment] -HUGO_BASE_URL = "$DEPLOY_PRIME_URL" +command = "make build-draft -e" +environment.HUGO_BASEURL = "$DEPLOY_PRIME_URL"