1
1
DOCKER = docker
2
- HUGO_VERSION = 0.49
2
+ HUGO_VERSION = 0.52
3
3
DOCKER_IMAGE = kubernetes-hugo
4
4
DOCKER_RUN = $(DOCKER ) run --rm --interactive --tty --volume $(CURDIR ) :/src
5
5
NODE_BIN = node_modules/.bin
@@ -13,20 +13,20 @@ help: ## Show this help.
13
13
all : build # # Build site with production settings and put deliverables in ./public
14
14
15
15
build : # # Build site with production settings and put deliverables in ./public
16
- hugo
16
+ hugo --minify
17
17
18
18
build-preview : # # Build site with drafts and future posts enabled
19
- hugo -D -F
19
+ hugo --buildDrafts --buildFuture
20
20
21
21
functions-build :
22
22
$(NETLIFY_FUNC ) build functions-src
23
23
24
24
check-headers-file :
25
25
scripts/check-headers-file.sh
26
26
27
- production-build : build check-headers-file # # Build the production site and ensure that noindex headers aren't added
27
+ production-build : check-hugo-versions build check-headers-file # # Build the production site and ensure that noindex headers aren't added
28
28
29
- non-production-build : # # Build the non-production site, which adds noindex headers to prevent indexing
29
+ non-production-build : check-hugo-versions # # Build the non-production site, which adds noindex headers to prevent indexing
30
30
hugo --enableGitInfo
31
31
32
32
sass-build :
@@ -36,7 +36,7 @@ sass-develop:
36
36
scripts/sass.sh develop
37
37
38
38
serve : # # Boot the development server.
39
- hugo server --ignoreCache --disableFastRender -- buildFuture
39
+ hugo server --ignoreCache --buildFuture
40
40
41
41
docker-image :
42
42
$(DOCKER ) build . --tag $(DOCKER_IMAGE ) --build-arg HUGO_VERSION=$(HUGO_VERSION )
@@ -46,3 +46,13 @@ docker-build:
46
46
47
47
docker-serve :
48
48
$(DOCKER_RUN ) -p 1313:1313 $(DOCKER_IMAGE ) hugo server --buildFuture --bind 0.0.0.0
49
+
50
+ # This command is used only by Travis CI; do not run this locally
51
+ travis-hugo-build :
52
+ curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION} /hugo_${HUGO_VERSION} _linux-64bit.tar.gz | tar -xz
53
+ mkdir -p ${TRAVIS_HOME} /bin
54
+ mv hugo ${TRAVIS_HOME} /bin
55
+ export PATH=${TRAVIS_HOME} /bin:$PATH
56
+
57
+ check-hugo-versions :
58
+ scripts/hugo-version-check.sh $(HUGO_VERSION )
0 commit comments