fix atom feed too

This commit is contained in:
Luke Smith 2021-03-16 22:25:56 -04:00
parent c33de03237
commit 673b2fcaa5
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -183,14 +183,14 @@ blog/atom.xml: $(ARTICLES)
printf '%s ' "$$f"; \ 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"; \ 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 \ done | sort -k2nr | head -n $(BLOG_FEED_MAX) | cut -d" " -f1,3- | while IFS=" " read -r FILE DATE AUTHOR; do \
printf '<entry>\n<title type="text">%s</title>\n<link rel="alternate" type="text/html" href="%s"/>\n<id>%s</id>\n<published>%s</published>\n<updated>%s</updated>\n<author><name>%s</name></author>\n<summary type="text">%s</summary>\n</entry>\n' \ printf '<entry>\n<title type="text">%s</title>\n<link rel="alternate" type="text/html" href="%s"/>\n<id>%s</id>\n<published>%s</published>\n<updated>%s</updated>\n<author><name>%s</name></author>\n<summary type="html"><![CDATA[%s]]></summary>\n</entry>\n' \
"`head -n 1 $$FILE | sed 's/^# //'`" \ "`head -n 1 $$FILE | sed 's/^# //'`" \
"$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \
"$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \ "$(BLOG_URL_ROOT)`basename $$FILE | sed 's/\.md/\.html/'`" \
"$$DATE" \ "$$DATE" \
"`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \ "`git log -n 1 --date="format:%Y-%m-%dT%H:%M:%SZ" --pretty=format:'%ad' -- "$$FILE"`" \
"$$AUTHOR" \ "$$AUTHOR" \
"`tail -n+3 $$FILE`"; \ "`markdown < $$FILE`"; \
done >> $@ done >> $@
printf '</feed>\n' >> $@ printf '</feed>\n' >> $@