diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-04-21 19:57:22 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-04-21 19:57:22 +0300 |
commit | 5b364613210c8b7186f63401e9ab96001e99c8a0 (patch) | |
tree | 31b19d2aac2fbc4412ef447b04bf77922934a740 | |
parent | 06c8229e692f3e0ea8813b31cdd624ad69082269 (diff) | |
download | benzin-5b364613210c8b7186f63401e9ab96001e99c8a0.tar.gz |
feat: add description
-rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 '/<head>/{' \ -e 'a <title>' -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 $* > $@ |