diff options
author | eug-vs <eugene@eug-vs.xyz> | 2021-08-14 00:15:25 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2021-08-14 00:15:25 +0300 |
commit | 529ad25479662ba8c861b4c2d9233b15190b9400 (patch) | |
tree | ddec677917630f8465cd4fe4b3e1c68f571ef52a /Makefile | |
parent | 4fa5a63695f30813723530b9cf63d197a1696c7a (diff) | |
download | eug-vs-xyz-529ad25479662ba8c861b4c2d9233b15190b9400.tar.gz |
feat(seo): add page meta description
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -22,15 +22,17 @@ all: $(HTML) %.html: %.md @echo $@ - @PAGETITLE=$$(sed '/^#/q' $< | sed 's/:[a-z]*://; s/#* //'); \ + @DESCRIPTION=$$(sed '2,/^$$/!d' $< | tr '\n' ' '); \ + PAGETITLE=$$(sed '/^#/q' $< | sed 's/:[a-z]*://; s/#* //'); \ sed "$(LINK_SEDSTRING) $(EMOJI_SEDSTRING)" $< \ - | pandoc $(PANDOC_ARGS) -M pagetitle="$$PAGETITLE | $(TITLE)" > $@ + | pandoc $(PANDOC_ARGS) -M pagetitle="$$PAGETITLE | $(TITLE)" -M description="$$DESCRIPTION" > $@ index.html: index.md blog/preview.md @echo $@ - @sed "/Recent blog posts/r blog/preview.md" $< \ + @DESCRIPTION=$$(sed '2,/^$$/!d' $< | tr '\n' ' '); \ + sed "/Recent blog posts/r blog/preview.md" $< \ | sed "$(LINK_SEDSTRING) $(EMOJI_SEDSTRING)" \ - | pandoc $(PANDOC_ARGS) -M pagetitle="$(TITLE)" > $@ + | pandoc $(PANDOC_ARGS) -M pagetitle="$(TITLE)" -M description="$$DESCRIPTION"> $@ blog/preview.md: blog/index.md @echo $@ |