don't regenerate the feeds when non-note m4 files change
[~bandali/bndl.org] / meta_feed_rss.m4
index c0e30c9..220a517 100644 (file)
@@ -1,17 +1,22 @@
 include(meta_defs.m4)dnl
 <?xml version="1.0" encoding="UTF-8" ?>
-<rss version="2.0">
+<rss version="2.0"
+     xmlns:atom="http://www.w3.org/2005/Atom"
+     xmlns:content="http://purl.org/rss/1.0/modules/content/">
 <channel>
 <title>Amin Bandali's Personal Site</title>
 <description>Notes and blog posts by Amin Bandali</description>
-<link>https://bndl.org</link>
+<link>__d`'__p/</link>
 <lastBuildDate>syscmd(date -uR | tr -d \\n)</lastBuildDate>
 <pubDate>syscmd(date -uR | tr -d \\n)</pubDate>
 <ttl>1800</ttl>
+<atom:link href="__d`'__p/notes.rss" rel="self" type="application/rss+xml" />
+<atom:link href="__d`'__p/notes.atom" rel="alternate" type="application/atom+xml" />
+<atom:link href="__d`'__p/" rel="alternate" type="text/html" />
 define(__feed_rss)dnl
 define(`fordown',`ifelse($#,0,``$0'',`ifelse(eval($2>=$3),1,
   `pushdef(`$1',$2)$4`'popdef(`$1')$0(`$1',decr($2),$3,`$4')')')')
 fordown(`__i',__latest,eval(__latest-10),`
-  syscmd(sed "s/\&/\&amp;/g;s/>/\&gt;/g;s/</\&lt;/g" _get(`notes', __i).m4 | m4 -D__feed_rss)')
+  syscmd(m4 -D__feed_rss -D__d=__d -D__p=__p _get(`notes', __i).m4)')
 </channel>
 </rss>