diff --git a/Makefile b/Makefile index ae94c63d1..23c14e867 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,11 @@ +ifndef DEPLOY_PRIME_URL +override DEPLOY_PRIME_URL = localhost +endif + +ifndef HUGO_ENV +override HUGO_ENV = development +endif + clean: rm -rf public @@ -11,16 +19,25 @@ serve: dependencies production-build: dependencies make check-github-rate-limit - hugo --minify + hugo --minify --environment $(HUGO_ENV) + make check-links + +branch-build: dependencies + make check-github-rate-limit + hugo \ + --minify \ + --environment $(HUGO_ENV) \ + --baseURL $(DEPLOY_PRIME_URL) make check-links preview-build: dependencies make check-github-rate-limit hugo \ - --baseURL $(DEPLOY_PRIME_URL) \ --buildDrafts \ --buildFuture \ - --minify + --minify \ + --environment $(HUGO_ENV) \ + --baseURL $(DEPLOY_PRIME_URL) make check-links link-checker-setup: diff --git a/netlify.toml b/netlify.toml index 3232a5fd0..9805ae0d3 100644 --- a/netlify.toml +++ b/netlify.toml @@ -14,10 +14,12 @@ HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" [context.deploy-preview] +HUGO_ENV = "development" command = "make preview-build" [context.branch-deploy] -command = "make preview-build" +HUGO_ENV = "archive" +command = "make branch-build" [functions] -node_bundler = "esbuild" \ No newline at end of file +node_bundler = "esbuild"