diff --git a/Makefile b/Makefile index c5db62f..0a92cde 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,11 @@ DEST ?= axs@sdf.org:html SITE_URL ?= https://axs.sdf.org -.PHONY: default help publish +.PHONY: default help publish build -build: #> - @echo "\t 🏗️ Building site" - @# We call hugo with two options: - @# --cleanDestinationDir, to remove deleted files - @# --minify, to compress files my removing extra whitespace - hugo --cleanDestinationDir --minify +default: build + +build: .build_sentinel #> publish: build #> Publish site @echo "Publishing..." @@ -36,3 +33,11 @@ publish: build #> Publish site @ssh axs@sdf.org 'mkhomepg -p' @echo "✓ Publising complete" @echo "\nThe site should be available on ${SITE_URL}" + +.build_sentinel: $(wildcard content/*/*) + @echo "\t 🏗️ Building site" + @# We call hugo with two options: + @# --cleanDestinationDir, to remove deleted files + @# --minify, to compress files my removing extra whitespace + hugo --cleanDestinationDir --minify + @touch $@