2020-09-17 13:35:38 -05:00
|
|
|
HUGO ?= hugo
|
|
|
|
DEV_SERVE ?= serve --buildDrafts --buildFuture --buildExpired
|
2020-12-16 00:13:13 -06:00
|
|
|
NETLIFY_DEPLOY ?= deploy -d public
|
2020-12-17 16:37:54 -06:00
|
|
|
LOCAL_IP ?= $(shell ip a | grep -oP '192\.168\.\d+\.\d+/' | head -n 1 | tr -d '/')
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: all
|
2020-07-14 16:51:25 -05:00
|
|
|
all: build
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: build
|
2023-07-16 20:15:50 -05:00
|
|
|
build: static/styles.css ; @${HUGO}
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: public
|
|
|
|
public: build
|
|
|
|
|
2023-07-06 17:02:38 -05:00
|
|
|
.PHONY: serve
|
|
|
|
serve:
|
|
|
|
@stylus -w src/stylus/styles.styl --sourcemap -o static/styles.css &
|
|
|
|
@${HUGO} serve
|
|
|
|
|
2020-09-17 13:35:38 -05:00
|
|
|
.PHONY: dev
|
2020-12-15 17:29:49 -06:00
|
|
|
dev:
|
2020-12-16 00:13:13 -06:00
|
|
|
@stylus -w src/stylus/styles.styl --sourcemap -o static/styles.css &
|
2020-12-15 17:29:49 -06:00
|
|
|
@${HUGO} ${DEV_SERVE}
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: dev-ext
|
2020-12-16 00:13:13 -06:00
|
|
|
dev-ext:
|
|
|
|
@stylus -w src/stylus/styles.styl --sourcemap -o static/styles.css &
|
2020-12-17 16:37:54 -06:00
|
|
|
@${HUGO} ${DEV_SERVE} --bind ${LOCAL_IP} --baseURL ${LOCAL_IP}
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: clean
|
2020-07-14 18:02:25 -05:00
|
|
|
clean: ; @rm -r public
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: publish
|
2020-12-15 17:29:49 -06:00
|
|
|
publish: clean-css public ; @netlify ${NETLIFY_DEPLOY} && echo "Run \`make publish-prod\` when ready."
|
2020-09-17 13:35:38 -05:00
|
|
|
|
|
|
|
.PHONY: publish-prod
|
2020-12-15 17:29:49 -06:00
|
|
|
publish-prod: clean-css public ; @netlify ${NETLIFY_DEPLOY} --prod
|
|
|
|
|
2020-12-16 00:13:13 -06:00
|
|
|
static/styles.css: src/stylus/styles.styl $(shell find src/stylus -regex ".*\.styl")
|
2020-12-15 17:29:49 -06:00
|
|
|
stylus --compress $< -o $@
|
|
|
|
|
|
|
|
.PHONY: clean-css
|
2020-12-16 00:13:13 -06:00
|
|
|
clean-css: ; rm -f static/styles.css
|