33 lines
905 B
Makefile
33 lines
905 B
Makefile
# This makefile builds the website to be published.
|
|
# For the HTTP/HTML portion, that's pushed to Github pages.
|
|
# For the gemini portion, that's also pushed to my gemini server by this makefile.
|
|
source_files := $(shell find content/*.md)
|
|
target_files := $(patsubst content/%.md,gemini/%.gmi,$(source_files))
|
|
|
|
.PHONY: default
|
|
default: publish-gemini build-html
|
|
|
|
gemini/%.gmi: content/%.md
|
|
lowdown -tgemini $< > $@
|
|
|
|
gemini/index.gmi: $(source_files)
|
|
for file in $(target_files) ; do \
|
|
echo "=> $$file" | sed 's/gemini//' >> gemini/index.gmi ; \
|
|
done
|
|
|
|
.PHONY: build-gemini
|
|
build-gemini: $(target_files) gemini/index.gmi
|
|
cp gemini/_index.gmi gemini/index.gmi
|
|
|
|
.PHONY: build-html
|
|
build-html:
|
|
boot publish
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
echo ${target_files}
|
|
|
|
.PHONY: publish
|
|
publish-gemini: $(target_files) gemini/index.gmi
|
|
rsync -av content/img content/extra gemini/index.gmi $^ gemini.bgenc.net:/var/gemini/
|