2022-05-02 15:11:40 +00:00
|
|
|
.PHONY: help build create debug clean up down
|
|
|
|
|
2022-06-07 13:54:07 +00:00
|
|
|
BASE := --baseURL https://proxy.blacktarheroin.no/
|
2022-03-29 22:52:36 +00:00
|
|
|
|
2022-04-07 15:52:18 +00:00
|
|
|
help:
|
|
|
|
@echo '= Make targets:'
|
|
|
|
@echo 'build: creates a public/ folder with the built static files'
|
|
|
|
@echo 'create: runs the development server serving the built static files'
|
|
|
|
@echo 'check: like create but production environment'
|
|
|
|
@echo 'debug: like create without drafts and with --debug'
|
|
|
|
@echo 'clean: deletes the public/ folder'
|
2022-05-02 15:11:40 +00:00
|
|
|
@echo 'There is also "up" and "down" these starts or kills a languagetool api'
|
|
|
|
@echo 'docker container, port 8010, localhost'
|
|
|
|
|
|
|
|
LANGTOOL := silviof/docker-languagetool:latest
|
|
|
|
DOCK := docker # maybe podman?
|
|
|
|
|
|
|
|
up:
|
2022-12-19 14:18:59 +00:00
|
|
|
$(DOCK) run --rm -dn langtool -p127.0.0.1:8010:8010 $(LANGTOOL)
|
2022-05-02 15:11:40 +00:00
|
|
|
down:
|
|
|
|
$(DOCK) kill langtool
|
|
|
|
pull:
|
|
|
|
$(DOCK) pull $(LANGTOOL)
|
2022-03-29 22:52:36 +00:00
|
|
|
|
2022-04-07 15:52:18 +00:00
|
|
|
HUGO := hugo --printI18nWarnings --printPathWarnings --printUnusedTemplates --templateMetricsHints # --templateMetrics --cleanDestinationDir --gc
|
2022-06-07 13:54:07 +00:00
|
|
|
SERV := server $(BASE) --bind 0.0.0.0 --liveReloadPort 443 --appendPort=false --disableFastRender --printMemoryUsage --noHTTPCache --renderToDisk --navigateToChanged
|
2022-04-07 15:52:18 +00:00
|
|
|
DEV := $(HUGO) -e dev $(SERV)
|
|
|
|
|
2022-04-07 23:52:00 +00:00
|
|
|
build: clean_pub
|
2022-04-07 15:52:18 +00:00
|
|
|
$(HUGO) -e prod
|
2022-04-07 23:52:00 +00:00
|
|
|
check: clean_pub
|
2022-04-07 15:52:18 +00:00
|
|
|
$(HUGO) -e prod $(SERV)
|
2022-03-29 22:52:36 +00:00
|
|
|
create:
|
2022-04-07 15:52:18 +00:00
|
|
|
$(DEV) -D
|
|
|
|
debug:
|
|
|
|
$(DEV) --debug
|
2022-04-07 23:52:00 +00:00
|
|
|
clean: clean_pub
|
2022-05-02 15:11:40 +00:00
|
|
|
rm -fr resources/ hugo_stats.json .hugo_build.lock
|
2022-06-10 15:35:31 +00:00
|
|
|
clean_js: clean
|
|
|
|
rm -fr node_modules/ yarn.lock
|
2022-04-07 23:52:00 +00:00
|
|
|
clean_pub:
|
|
|
|
rm -fr public/
|