diff options
-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 $* > $@ |