# BENZIN Makefile BASE_URL=https://example.com PANDOC_ARGS=--from=gfm+emoji --to=html --section-divs PAGE_TEMPLATE=templates/page.html OPENRING_TEMPLATE=templates/openring.html RSS_TEMPLATE=templates/rss.xml RSS_ITEM_TEMPLATE=templates/rss_item.xml RSS=out/blog/index.xml OPENRING_FOOTER=tmp/openring.html OPENRING_ARGS=-s https://eug-vs.xyz/blog/index.xml -s https://drewdevault.com/blog/index.xml BLOG_SOURCES=$(wildcard src/blog/*.md) SOURCES=$(wildcard src/*.md) $(BLOG_SOURCES) TMP_HTML=$(patsubst src/%.md, tmp/%.content.html, $(SOURCES)) HTML=$(patsubst src/%.md, out/%.html, $(SOURCES)) BLOG_XML=$(patsubst src/%.md, tmp/%.xml, $(BLOG_SOURCES)) .PHONY: clean all .SECONDARY: $(TMP_HTML) $(BLOG_XML) all: $(HTML) $(RSS) out/%.html: tmp/%.content.html tmp/%.meta.title $(PAGE_TEMPLATE) $(OPENRING_FOOTER) @mkdir -p $(@D) sed "/<\/main>/e cat $< $(OPENRING_FOOTER)" $(PAGE_TEMPLATE) > $@ sed -i \ -e '/
/{' \ -e 'a