1
0
Fork 0
website/Makefile

33 lines
905 B
Makefile
Raw Normal View History

2022-03-13 16:50:27 -05:00
# 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
2022-03-18 03:19:08 -05:00
default: publish-gemini build-html
2022-03-13 16:50:27 -05:00
gemini/%.gmi: content/%.md
lowdown -tgemini $< > $@
2022-03-18 03:19:08 -05:00
gemini/index.gmi: $(source_files)
2022-03-13 16:50:27 -05:00
for file in $(target_files) ; do \
echo "=> $$file" | sed 's/gemini//' >> gemini/index.gmi ; \
done
2022-03-18 03:19:08 -05:00
.PHONY: build-gemini
build-gemini: $(target_files) gemini/index.gmi
cp gemini/_index.gmi gemini/index.gmi
2022-03-13 16:50:27 -05:00
.PHONY: build-html
build-html:
boot publish
.PHONY: clean
clean:
echo ${target_files}
.PHONY: publish
2022-03-18 03:19:08 -05:00
publish-gemini: $(target_files) gemini/index.gmi
2022-03-13 16:50:27 -05:00
rsync -av content/img content/extra gemini/index.gmi $^ gemini.bgenc.net:/var/gemini/