Change RSS descriptions to use OpenGraph description
authorJoann Mõndresku <joann@cernodile.com>
Sat, 24 Jul 2021 09:32:45 +0000 (12:32 +0300)
committerJoann Mõndresku <joann@cernodile.com>
Sat, 24 Jul 2021 09:32:45 +0000 (12:32 +0300)
blogit

diff --git a/blogit b/blogit
index cfc7017ed149c84e21740ac5346b1f1e3607a196..7cabbaafc34e655683815d4c8bf35328541fb6cc 100755 (executable)
--- a/blogit
+++ b/blogit
@@ -184,7 +184,7 @@ blog/rss.xml: $(ARTICLES)
                        "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \
                        "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \
                        "$$DATE" \
                        "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \
                        "$(BLOG_URL_ROOT)/`basename $$FILE .md`.html" \
                        "$$DATE" \
-                       "`sed -n 's/&/&amp;/;1d;/^$$/{2{d;b};q};p' < $$FILE`"; \
+                       "`cat "$$FILE" | grep ";description:" | cut -d: -f2-`"; \
        done >> $@
        printf '</channel>\n</rss>\n' >> $@
 
        done >> $@
        printf '</channel>\n</rss>\n' >> $@
 
@@ -202,6 +202,6 @@ blog/atom.xml: $(ARTICLES)
                        "$$DATE" \
                        "`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \
                        "$$AUTHOR" \
                        "$$DATE" \
                        "`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \
                        "$$AUTHOR" \
-                       "`sed -n 's/&/&amp;/;1d;/^$$/{2{d;b};q};p' < $$FILE`"; \
+                       "`cat "$$FILE" | grep ";description:" | cut -d: -f2-`"; \
        done >> $@
        printf '</feed>\n' >> $@
        done >> $@
        printf '</feed>\n' >> $@