From 0190dd163692585f3da3bf642e258b46df873a85 Mon Sep 17 00:00:00 2001 From: Harrison Wong Date: Mon, 15 Mar 2021 11:36:26 -0400 Subject: [PATCH] fix rss links --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 8a358c1..2d71560 100644 --- a/Makefile +++ b/Makefile @@ -169,8 +169,8 @@ blog/rss.xml: $(ARTICLES) done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE; do \ printf '\n%s\n%s\n%s\n%s\n%s\n\n' \ "`head -n 1 $$FILE | sed 's/^# //'`" \ - "$(BLOG_URL_ROOT)/`basename $$FILE`.html" \ - "$(BLOG_URL_ROOT)/`basename $$FILE`.html" \ + "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ + "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ "$$DATE" \ "`tail -n+3 < $$FILE`"; \ done >> $@ @@ -178,15 +178,15 @@ blog/rss.xml: $(ARTICLES) blog/atom.xml: $(ARTICLES) printf '\n\n%s\n%s\n%s\n\n%s\n\n' \ - "$(BLOG_TITLE)" "$(BLOG_DESCRIPTION)" "$(shell date +%Y-%m-%dT%H:%M:%SZ)" "$(BLOG_URL_ROOT)" "$(BLOG_URL_ROOT)/atom.xml" "$(BLOG_URL_ROOT)/atom.xml" > $@ + "$(BLOG_TITLE)" "$(BLOG_DESCRIPTION)" "$(shell date +%Y-%m-%dT%H:%M:%SZ)" "$(BLOG_URL_ROOT)" "$(BLOG_URL_ROOT)atom.xml" "$(BLOG_URL_ROOT)/atom.xml" > $@ for f in $(ARTICLES); do \ printf '%s ' "$$f"; \ git log -n 1 --diff-filter=A --date="format:%s %Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad %aN%n' -- "$$f"; \ done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE AUTHOR; do \ printf '\n%s\n\n%s\n%s\n%s\n%s\n%s\n\n' \ "`head -n 1 $$FILE | sed 's/^# //'`" \ - "$(BLOG_URL_ROOT)/`basename $$FILE`.html" \ - "$(BLOG_URL_ROOT)/`basename $$FILE`.html" \ + "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ + "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ "$$DATE" \ "`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \ "$$AUTHOR" \