diff --git a/Makefile b/Makefile index b393271..4fe6f59 100644 --- a/Makefile +++ b/Makefile @@ -12,9 +12,14 @@ # #-----------------------------------------------------------------------------# +SHELL = /usr/bin/bash + DEST ?= axs@sdf.org:html SITE_URL ?= https://axs.sdf.org +HUGO_SERVE_FLAGS ?= --buildDrafts +hugo_serve_cmd = hugo server ${HUGO_SERVE_FLAGS} + help_generator = generate-help.awk #-----------------------------------------------------------------------------# @@ -55,6 +60,17 @@ publish: build #> Publish site @echo "✓ Publising complete" @echo "\nThe site should be available on ${SITE_URL}" +serve: #> Start a Hugo server + @if [[ -z $${TMUX} ]]; \ + then \ + echo not tmux; \ + else \ + echo Starting a Hugo server in a new Tmux window; \ + tmux neww ${hugo_serve_cmd}; \ + fi + + + help: #> Generate this help message @gawk -f ${help_generator} $(MAKEFILE_LIST)