From 73376d049e64f335b7c40c94c4d7f6fa9e06d77b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 21 Apr 2022 16:18:31 +0300 Subject: fix: correctly display title on index page --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0aada0c..a049daf 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ # BENZIN Makefile -BASE_URL=https://example.com +WEBSITE_URL=https://example.com +WEBSITE_TITLE="Example Website" + CONVERT=pandoc --from=gfm+emoji --to=html --section-divs --shift-heading-level-by=1 PAGE_TEMPLATE=templates/page.html @@ -42,6 +44,11 @@ tmp/%.content.html: src/%.md tmp/%.meta.title: src/%.md @mkdir -p $(@D) sed '/^#/q' $< | sed 's/#* //' > $@ + echo "| $(WEBSITE_TITLE)" >> $@ + +tmp/index.meta.title: + @mkdir -p $(@D) + echo $(WEBSITE_TITLE) > $@ $(RSS): $(BLOG_XML) $(RSS_TEMPLATE) @mkdir -p $(@D) @@ -53,7 +60,7 @@ tmp/%.xml: tmp/%.content.html tmp/%.meta.title $(RSS_ITEM_TEMPLATE) sed -i \ -e '//{' \ -e 'a ' -e "r tmp/$*.meta.title" -e 'a <\/title>' \ - -e "a <link>$(BASE_URL)/$*.html<\/link>" \ + -e "a <link>$(WEBSITE_URL)/$*.html<\/link>" \ -e '}' $@ $(OPENRING_FOOTER): $(OPENRING_TEMPLATE) -- cgit v1.2.3