Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit 85dc33a

Browse files
authored
Makefile: support use of a non-npm version of Hugo (#101)
Signed-off-by: Patrice Chalin <pchalin@gmail.com>
1 parent 6f7ce8e commit 85dc33a

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

Makefile

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,29 @@
1-
serve:
2-
npx hugo server \
3-
--buildDrafts \
4-
--buildFuture \
5-
--disableFastRender
1+
# To use a non-npm version of hugo, invoke make with HUGO set to your hugo command.
2+
# Example: make build HUGO=hugo
3+
4+
HUGO:=npx hugo
5+
6+
ifeq ($(DEPLOY_PRIME_URL),)
7+
DEPLOY_PRIME_URL:=http://localhost:8888/
8+
endif
9+
10+
build:
11+
$(HUGO) --cleanDestinationDir -e dev -DFE
612

713
production-build:
8-
npx hugo \
9-
--minify
14+
$(HUGO) --cleanDestinationDir --minify
1015

1116
preview-build:
12-
npx hugo \
17+
$(HUGO) --cleanDestinationDir \
1318
--baseURL $(DEPLOY_PRIME_URL) \
1419
--buildDrafts \
1520
--buildFuture \
1621
--minify
1722

18-
open:
19-
open https://cncf-hugo-starter.netlify.com
23+
serve:
24+
$(HUGO) serve \
25+
--buildDrafts \
26+
--buildFuture
27+
28+
hugo-version:
29+
$(HUGO) version

0 commit comments

Comments
 (0)