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

Makefile: support use of a non-npm version of Hugo #101

Merged
merged 1 commit into from
Jul 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
serve:
npx hugo server \
--buildDrafts \
--buildFuture \
--disableFastRender
# To use a non-npm version of hugo, invoke make with HUGO set to your hugo command.
# Example: make build HUGO=hugo

HUGO:=npx hugo

ifeq ($(DEPLOY_PRIME_URL),)
DEPLOY_PRIME_URL:=http://localhost:8888/
endif

build:
$(HUGO) --cleanDestinationDir -e dev -DFE

production-build:
npx hugo \
--minify
$(HUGO) --cleanDestinationDir --minify

preview-build:
npx hugo \
$(HUGO) --cleanDestinationDir \
--baseURL $(DEPLOY_PRIME_URL) \
--buildDrafts \
--buildFuture \
--minify

open:
open https://cncf-hugo-starter.netlify.com
serve:
$(HUGO) serve \
--buildDrafts \
--buildFuture

hugo-version:
$(HUGO) version