Add hugo serve target
This commit is contained in:
parent
f212a23b18
commit
0ceda48fe9
16
Makefile
16
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user