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);
84 Index: doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn
85 ===================================================================
86 --- doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn (revision 4066)
87 +++ doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn (working copy)
89 element (whose datetime format is [iso 8601](http://www.w3.org/TR/NOTE-datetime)).
90 This patch updates :) `inline.pm` and the two relevant templates.
92 - --- inline.pm.orig 2007-08-07 05:44:26.000000000 +0200
93 - +++ inline.pm 2007-08-07 05:47:37.000000000 +0200
97 - date_822 => date_822($pagectime{$p}),
98 - + mdate_822 => date_822($pagemtime{$p}),
99 - date_3339 => date_3339($pagectime{$p}),
100 - + mdate_3339 => date_3339($pagemtime{$p}),
103 - if ($itemtemplate->query(name => "enclosure")) {
104 - @@ -397,7 +399,7 @@
105 - $content.=$itemtemplate->output;
106 - $itemtemplate->clear_params;
108 - - $lasttime = $pagectime{$p} if $pagectime{$p} > $lasttime;
109 - + $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
112 - my $template=template($feedtype."page.tmpl", blind_cache => 1);
113 - --- atomitem.tmpl.orig 2007-08-07 05:44:43.000000000 +0200
114 - +++ atomitem.tmpl 2007-08-07 05:46:14.000000000 +0200
116 - <category term="<TMPL_VAR CATEGORY>" />
119 - - <updated><TMPL_VAR DATE_3339></updated>
120 - + <updated><TMPL_VAR MDATE_3339></updated>
121 - + <published><TMPL_VAR DATE_3339></published>
122 - <TMPL_IF NAME="ENCLOSURE">
123 - <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
125 - --- rssitem.tmpl.orig 2007-08-07 05:44:58.000000000 +0200
126 - +++ rssitem.tmpl 2007-08-07 06:06:36.000000000 +0200
129 - <title><TMPL_VAR TITLE></title>
131 - + <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
132 - <guid><TMPL_VAR URL></guid>
133 - <link><TMPL_VAR PERMALINK></link>
134 - <TMPL_IF NAME="CATEGORIES">
136 +--- inline.pm.orig 2007-08-07 05:44:26.000000000 +0200
137 ++++ inline.pm 2007-08-07 05:47:37.000000000 +0200
141 + date_822 => date_822($pagectime{$p}),
142 ++ mdate_822 => date_822($pagemtime{$p}),
143 + date_3339 => date_3339($pagectime{$p}),
144 ++ mdate_3339 => date_3339($pagemtime{$p}),
147 + if ($itemtemplate->query(name => "enclosure")) {
149 + $content.=$itemtemplate->output;
150 + $itemtemplate->clear_params;
152 +- $lasttime = $pagectime{$p} if $pagectime{$p} > $lasttime;
153 ++ $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
156 + my $template=template($feedtype."page.tmpl", blind_cache => 1);
157 +--- atomitem.tmpl.orig 2007-08-07 05:44:43.000000000 +0200
158 ++++ atomitem.tmpl 2007-08-07 05:46:14.000000000 +0200
160 + <category term="<TMPL_VAR CATEGORY>" />
163 +- <updated><TMPL_VAR DATE_3339></updated>
164 ++ <updated><TMPL_VAR MDATE_3339></updated>
165 ++ <published><TMPL_VAR DATE_3339></published>
166 + <TMPL_IF NAME="ENCLOSURE">
167 + <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
169 +--- rssitem.tmpl.orig 2007-08-07 05:44:58.000000000 +0200
170 ++++ rssitem.tmpl 2007-08-07 06:06:36.000000000 +0200
173 + <title><TMPL_VAR TITLE></title>
175 ++ <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
176 + <guid><TMPL_VAR URL></guid>
177 + <link><TMPL_VAR PERMALINK></link>
178 + <TMPL_IF NAME="CATEGORIES">
183 +[[done]], thanks --[[Joey]]