@@ -29,13 +29,13 @@ module-init: ## Initialize required submodules.
29
29
all : build # # Build site with production settings and put deliverables in ./public
30
30
31
31
build : module-check # # Build site with non-production settings and put deliverables in ./public
32
- hugo --minify --environment development
32
+ hugo --cleanDestinationDir -- minify --environment development
33
33
34
34
build-preview : module-check # # Build site with drafts and future posts enabled
35
- hugo --buildDrafts --buildFuture --environment preview
35
+ hugo --cleanDestinationDir -- buildDrafts --buildFuture --environment preview
36
36
37
37
deploy-preview : # # Deploy preview site via netlify
38
- hugo --enableGitInfo --buildFuture --environment preview -b $(DEPLOY_PRIME_URL )
38
+ hugo --cleanDestinationDir -- enableGitInfo --buildFuture --environment preview -b $(DEPLOY_PRIME_URL )
39
39
40
40
functions-build :
41
41
$(NETLIFY_FUNC ) build functions-src
@@ -44,11 +44,11 @@ check-headers-file:
44
44
scripts/check-headers-file.sh
45
45
46
46
production-build : module-check # # Build the production site and ensure that noindex headers aren't added
47
- hugo --minify --environment production
47
+ hugo --cleanDestinationDir -- minify --environment production
48
48
HUGO_ENV=production $(MAKE ) check-headers-file
49
49
50
50
non-production-build : module-check # # Build the non-production site, which adds noindex headers to prevent indexing
51
- hugo --enableGitInfo --environment nonprod
51
+ hugo --cleanDestinationDir -- enableGitInfo --environment nonprod
52
52
53
53
serve : module-check # # Boot the development server.
54
54
hugo server --buildFuture --environment development
0 commit comments