.PHONY: publish lint serve output: $(shell find content static) .cache/generator python generator/generate.py touch $@ .cache/generator: $(shell find generator) .cache/deps python -m black --experimental-string-processing . touch $@ .cache/deps: Makefile pip install black pip install beautifulsoup4==4.9.3 pip install marko==1.1.0 pip install python-frontmatter==1.0.0 mkdir -p .cache touch $@ publish: .cache/publish .cache/publish: output ifeq "${SSHUSER}" "" @echo "SSHUSER is undefined" else ifeq "${SSHPASS}" "" @echo "SSHPASS is undefined" else ifeq "${SSHDIR}" "" @echo "SSHDIR is undefined" else ifeq "${SSHPORT}" "" @echo "SSHPORT is undefined" else echo -e "cd ${SSHDIR} \n put -r output/* \n exit" | \ sshpass -e sftp -oBatchMode=no -b - sftp://${SSHUSER}@gkn.me.uk:${SSHPORT} touch $@ endif lint: $(shell find static/style) toolbox run npx prettier -w static/style/tarazed.css serve: output cd output && python -m http.server