From 2c25e0a927ef940561609314d0896ccf13d90ae6 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 21 Apr 2022 05:38:12 +0300 Subject: feat: add Openring footer --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 37b1b16..d6069a7 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,13 @@ # BENZIN Makefile -HEADER=templates/header.html PANDOC_ARGS=--from=gfm+emoji --to=html --section-divs +HEADER=templates/header.html +OPENRING_TEMPLATE=templates/openring.html RSS=out/blog/index.xml +OPENRING_FOOTER=tmp/openring.html +OPENRING_ARGS=-s https://eug-vs.xyz/blog/index.xml + BLOG_SOURCES=$(wildcard src/blog/*.md) SOURCES=$(wildcard src/*.md) $(BLOG_SOURCES) @@ -17,7 +21,7 @@ BLOG_XML=$(patsubst src/%.md, tmp/%.xml, $(BLOG_SOURCES)) all: $(HTML) $(RSS) -out/%.html: $(HEADER) tmp/%.content.html +out/%.html: $(HEADER) tmp/%.content.html $(OPENRING_FOOTER) @mkdir -p $(@D) cat $^ > $@ @@ -43,5 +47,9 @@ tmp/%.xml: tmp/%.content.html @echo " ]]>" >> $@ @echo '' >> $@ +$(OPENRING_FOOTER): $(OPENRING_TEMPLATE) + @mkdir -p $(@D) + openring $(OPENRING_ARGS) < $< > $@ + clean: rm -rf tmp out -- cgit v1.2.3