1 In [Atom](http://www.ietf.org/rfc/rfc4287.txt), we can provide `published` and `updated` information.
2 In [RSS](http://cyber.law.harvard.edu/rss/rss.html), there is only `pubDate`, for the
3 publication date, but an update can be mentioned with the [`dc:modified`](http://www.ietf.org/rfc/rfc2413.txt)
4 element (whose datetime format is [iso 8601](http://www.w3.org/TR/NOTE-datetime)).
5 This patch updates :) `inline.pm` and the two relevant templates.
7 > I tested a slightly modified patch, which I've put below for now.
8 > feedvalidator.org complains that dc:modified is not a known element. I'll
9 > bet some header needs to be added to make the dublin core stuff available.
10 > The atom feeds seem ok. --[[Joey]]
13 Index: debian/changelog
14 ===================================================================
15 --- debian/changelog (revision 4066)
16 +++ debian/changelog (working copy)
18 * Updated French translation from Cyril Brulebois. Closes: #437181
19 * The toc directive doesn't work well or make sense inside an inlined page.
20 Disable it when the page with the toc is nested inside another page.
21 + * Apply a patch from NicolasLimare adding modification date tags to rss and
22 + atom feeds, and also changing the publication time for a feed to the
23 + newest modiciation time (was newest creation time).
25 - -- Joey Hess <joeyh@debian.org> Sat, 11 Aug 2007 17:40:45 -0400
26 + -- Joey Hess <joeyh@debian.org> Sat, 11 Aug 2007 18:25:28 -0400
28 ikiwiki (2.5) unstable; urgency=low
30 Index: templates/atomitem.tmpl
31 ===================================================================
32 --- templates/atomitem.tmpl (revision 4066)
33 +++ templates/atomitem.tmpl (working copy)
35 <category term="<TMPL_VAR CATEGORY>" />
38 - <updated><TMPL_VAR DATE_3339></updated>
39 + <updated><TMPL_VAR MDATE_3339></updated>
40 + <published><TMPL_VAR CDATE_3339></published>
41 <TMPL_IF NAME="ENCLOSURE">
42 <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
44 Index: templates/rssitem.tmpl
45 ===================================================================
46 --- templates/rssitem.tmpl (revision 4066)
47 +++ templates/rssitem.tmpl (working copy)
49 <category><TMPL_VAR CATEGORY></category>
52 - <pubDate><TMPL_VAR DATE_822></pubDate>
53 + <pubDate><TMPL_VAR CDATE_822></pubDate>
54 + <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
55 <TMPL_IF NAME="ENCLOSURE">
56 <enclosure url="<TMPL_VAR ENCLOSURE>" type="<TMPL_VAR TYPE>" length="<TMPL_VAR LENGTH>" />
58 Index: IkiWiki/Plugin/inline.pm
59 ===================================================================
60 --- IkiWiki/Plugin/inline.pm (revision 4066)
61 +++ IkiWiki/Plugin/inline.pm (working copy)
63 title => pagetitle(basename($p)),
66 - date_822 => date_822($pagectime{$p}),
67 - date_3339 => date_3339($pagectime{$p}),
68 + cdate_822 => date_822($pagectime{$p}),
69 + mdate_822 => date_822($pagemtime{$p}),
70 + cdate_3339 => date_3339($pagectime{$p}),
71 + mdate_3339 => date_3339($pagemtime{$p}),
74 if ($itemtemplate->query(name => "enclosure")) {
76 $content.=$itemtemplate->output;
77 $itemtemplate->clear_params;
79 - $lasttime = $pagectime{$p} if $pagectime{$p} > $lasttime;
80 + $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
83 my $template=template($feedtype."page.tmpl", blind_cache => 1);
88 >> Yes I noticedthe bug today; the correct (tested on feedvalidator) rssitem.tmpl template must start with the following content:
91 <TMPL_IF NAME="AUTHOR">
92 <title><TMPL_VAR AUTHOR ESCAPE=HTML>: <TMPL_VAR TITLE></title>
93 <dcterms:creator><TMPL_VAR AUTHOR ESCAPE=HTML></dcterms:creator>
95 <title><TMPL_VAR TITLE></title>
97 <dcterms:modified><TMPL_VAR MDATE_3339></dcterms:modified>
98 <dcterms:created><TMPL_VAR DATE_3339></dcterms:created>
101 >> and rsspage.tmpl must start with:
103 <?xml version="1.0"?>
105 xmlns:dc="http://purl.org/dc/elements/1.1/"
106 xmlns:dcterms="http://purl.org/dc/terms/" >
109 >> — [[NicolasLimare]]