ref: b469932e87f5b0c047c20db6183fbd5fab608c46
parent: 42ce73cea42749f090dbd436447e6896e3c851bf
author: uriel <[email protected]>
date: Wed Jun 11 16:09:41 EDT 2008
More correctly follow the rss spec, and use mtime for lastBuildDate and the post date for pubDate instead.
--- a/bin/controller.rc
+++ b/bin/controller.rc
@@ -207,8 +207,9 @@
f = $1
uri = `{echo $f | sed 's,^'$sitedir',,'}
title=`{basename $f | sed 's/^[0-9\-]*_(.*)\.md$/\1/; s/_/ /g' }
+ date=`{/bin/date -Rd `{basename $f |sed 's/(^[0-9\-]*).*/\1/; s/-[0-9]$//'}}
stat=`{stat -c '%Y %U' $f}
- date=`{/bin/date -Rd @$stat(1)}
+ mdate=`{/bin/date -Rd @$stat(1)}
uri=$baseuri^`{cleanname `{echo -n $uri | sed 's/\.(md|tpl)//g'}}
by=$stat(2)
ifs=() {
@@ -246,6 +247,7 @@
<link>%($uri%)</link>
<guid isPermaLink="true">%($uri%)</guid>
<pubDate>%($date%)</pubDate>
+ <lastBuildDate>%($mdate%)</lastBuildDate>
<description><![CDATA[<pre>%($summary%)</pre>]]></description>
</item>
% }