2018-06-21 17:13:29 +00:00
|
|
|
DOCKER = docker
|
2018-08-21 16:52:13 +00:00
|
|
|
HUGO_VERSION = 0.47.1
|
2018-06-21 17:13:29 +00:00
|
|
|
DOCKER_IMAGE = kubernetes-hugo
|
|
|
|
DOCKER_RUN = $(DOCKER) run --rm --interactive --tty --volume $(PWD):/src
|
|
|
|
|
2018-05-05 16:00:51 +00:00
|
|
|
.PHONY: all build sass build-preview help serve
|
2016-09-07 23:37:43 +00:00
|
|
|
|
|
|
|
help: ## Show this help.
|
|
|
|
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
|
2018-08-21 19:51:15 +00:00
|
|
|
all: build ## Build site with production settings and put deliverables in ./public
|
2016-09-07 23:37:43 +00:00
|
|
|
|
2018-08-21 19:51:15 +00:00
|
|
|
build: ## Build site with production settings and put deliverables in ./public
|
2018-05-05 16:00:51 +00:00
|
|
|
hugo
|
2016-09-07 23:37:43 +00:00
|
|
|
|
2018-08-21 19:51:15 +00:00
|
|
|
build-preview: ## Build site with drafts and future posts enabled
|
2018-05-05 16:00:51 +00:00
|
|
|
hugo -D -F
|
2016-09-07 23:37:43 +00:00
|
|
|
|
2018-08-21 19:51:15 +00:00
|
|
|
check-headers-file:
|
|
|
|
scripts/check-headers-file.sh
|
|
|
|
|
|
|
|
production-build: build check-headers-file ## Build the production site and ensure that noindex headers aren't added
|
|
|
|
|
|
|
|
non-production-build: ## Build the non-production site, which adds noindex headers to prevent indexing
|
|
|
|
hugo --enableGitInfo
|
|
|
|
|
2016-09-07 23:37:43 +00:00
|
|
|
serve: ## Boot the development server.
|
2018-07-26 09:53:57 +00:00
|
|
|
hugo server --ignoreCache --disableFastRender
|
2017-08-06 04:11:12 +00:00
|
|
|
|
2018-06-21 17:13:29 +00:00
|
|
|
docker-image:
|
|
|
|
$(DOCKER) build . --tag $(DOCKER_IMAGE) --build-arg HUGO_VERSION=$(HUGO_VERSION)
|
|
|
|
|
|
|
|
docker-build:
|
|
|
|
$(DOCKER_RUN) $(DOCKER_IMAGE) hugo
|
|
|
|
|
2018-07-27 17:33:57 +00:00
|
|
|
docker-serve:
|
2018-06-21 17:13:29 +00:00
|
|
|
$(DOCKER_RUN) -p 1313:1313 $(DOCKER_IMAGE) hugo server --watch --bind 0.0.0.0
|