From 5b364613210c8b7186f63401e9ab96001e99c8a0 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Thu, 21 Apr 2022 19:57:22 +0300 Subject: feat: add description --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 67f46a5..82f8f2f 100644 --- a/Makefile +++ b/Makefile @@ -37,12 +37,13 @@ EMOJI_SOURCES=$(wildcard src/public/emoji/*) all: $(HTML) $(RSS) $(PUBLIC) -out/%.html: tmp/%.content.html tmp/%.meta.title $(PAGE_TEMPLATE) $(OPENRING_FOOTER) +out/%.html: tmp/%.content.html tmp/%.meta.title tmp/%.meta.description $(PAGE_TEMPLATE) $(OPENRING_FOOTER) @mkdir -p $(@D) sed "/<\/main>/e cat $< $(OPENRING_FOOTER)" $(PAGE_TEMPLATE) > $@ sed -i \ -e '//{' \ -e 'a ' -e "r tmp/$*.meta.title" -e 'a <\/title>' \ + -e 'a <meta name="description" content="' -e "r tmp/$*.meta.description" -e 'a "/>' \ -e '}' $@ tmp/%.content.html: src/%.md tmp/emoji.sed @@ -68,6 +69,10 @@ tmp/%.meta.title: src/%.md sed '/^#/q' $< | sed 's/#* //' > $@ @echo "| $(WEBSITE_TITLE)" >> $@ +tmp/%.meta.description: src/%.md + @mkdir -p $(@D) + sed '2,/^$$/!d' $< > $@ + tmp/blog/%.meta.date: src/blog/%.md @mkdir -p $(@D) @date --rfc-email -d $* > $@ -- cgit v1.2.3