2017-09-07 16:28:57 +00:00
|
|
|
SOURCE = /home/jer/git/fnordig.de/_site/
|
2017-07-09 12:18:22 +00:00
|
|
|
DEST = /var/www/sites/fnordig.de/
|
2022-04-22 21:09:50 +00:00
|
|
|
DATABASE_PATH = /home/jer/git/blogsearch/blog.db
|
2017-07-09 12:18:22 +00:00
|
|
|
|
2020-02-05 20:57:25 +00:00
|
|
|
default:
|
2022-01-29 23:49:51 +00:00
|
|
|
rm -rf _site
|
2023-01-01 15:29:01 +00:00
|
|
|
$(MAKE) build
|
2020-02-05 20:57:25 +00:00
|
|
|
$(MAKE) MAKEFLAGS=--jobs=2 dev
|
2019-11-12 12:04:49 +00:00
|
|
|
.PHONY: default
|
|
|
|
|
2020-02-05 20:57:25 +00:00
|
|
|
dev: serve rerun
|
|
|
|
.PHONY: dev
|
|
|
|
|
2017-07-09 12:18:22 +00:00
|
|
|
build:
|
2023-06-20 12:56:21 +00:00
|
|
|
cobalt build
|
2018-01-15 19:37:09 +00:00
|
|
|
.PHONY: build
|
2017-07-09 12:18:22 +00:00
|
|
|
|
2023-01-01 15:29:01 +00:00
|
|
|
serve:
|
2019-01-21 16:39:17 +00:00
|
|
|
@echo "Served on http://localhost:8000"
|
2023-06-18 13:59:30 +00:00
|
|
|
cd _site && httplz
|
2018-01-15 19:37:09 +00:00
|
|
|
.PHONY: serve
|
2017-07-09 12:18:22 +00:00
|
|
|
|
2022-04-22 20:44:09 +00:00
|
|
|
deploy: clean build index
|
2018-01-15 19:37:09 +00:00
|
|
|
rsync -va --delete $(SOURCE) $(DEST)
|
|
|
|
.PHONY: deploy
|
|
|
|
|
2022-04-22 20:44:09 +00:00
|
|
|
index:
|
|
|
|
DATABASE_PATH="$(DATABASE_PATH)" ./index.sh
|
|
|
|
.PHONY: index
|
|
|
|
|
2018-01-15 19:37:09 +00:00
|
|
|
clean:
|
|
|
|
cobalt clean
|
|
|
|
.PHONY: clean
|
2018-02-11 11:25:15 +00:00
|
|
|
|
|
|
|
rerun:
|
2022-03-03 18:53:50 +00:00
|
|
|
fd | entr -r -s 'make build'
|
2018-02-11 11:25:15 +00:00
|
|
|
.PHONY: rerun
|
2021-07-26 10:12:58 +00:00
|
|
|
|
|
|
|
latest-html: ## Get latests post renderewd into HTML
|
2021-09-16 15:00:04 +00:00
|
|
|
@find _posts -type f | sort | tail -1 | xargs -I% pandoc -f markdown -t html %
|
2021-07-26 10:12:58 +00:00
|
|
|
.PHONY: latest-html
|
2021-12-17 12:33:54 +00:00
|
|
|
|
|
|
|
spellcheck: ## Spellcheck the latest post
|
2023-02-28 20:05:17 +00:00
|
|
|
aspell --lang en_US --mode=markdown --dont-backup check $(shell find _posts -type f -name '*.md' | sort | tail -1)
|
2021-12-17 12:33:54 +00:00
|
|
|
.PHONY: spellcheck
|