X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/149fbcdad0d0f094d5b7aae6f8c31e8c242a38a5..c4678c071c83ea6c3dab5f346c5cdc52a4f8d7cd:/doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn diff --git a/doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn b/doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn index bb3b7854c..d28d492c2 100644 --- a/doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn +++ b/doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn @@ -4,40 +4,84 @@ publication date, but an update can be mentioned with the [`dc:modified`](http:/ element (whose datetime format is [iso 8601](http://www.w3.org/TR/NOTE-datetime)). This patch updates :) `inline.pm` and the two relevant templates. - --- inline.pm.orig 2007-08-07 05:44:26.000000000 +0200 - +++ inline.pm 2007-08-07 05:47:37.000000000 +0200 - @@ -362,7 +362,9 @@ - url => $u, - permalink => $u, - date_822 => date_822($pagectime{$p}), - + mdate_822 => date_822($pagemtime{$p}), - date_3339 => date_3339($pagectime{$p}), - + mdate_3339 => date_3339($pagemtime{$p}), - ); - - if ($itemtemplate->query(name => "enclosure")) { - --- atomitem.tmpl.orig 2007-08-07 05:44:43.000000000 +0200 - +++ atomitem.tmpl 2007-08-07 05:46:14.000000000 +0200 - @@ -11,7 +11,8 @@ - - - - - - + - + - - - - --- rssitem.tmpl.orig 2007-08-07 05:44:58.000000000 +0200 - +++ rssitem.tmpl 2007-08-07 06:06:36.000000000 +0200 - @@ -5,6 +5,7 @@ - - <TMPL_VAR TITLE> - - + - - - +> I tested a slightly modified patch, which I've put below for now. +> feedvalidator.org complains that dc:modified is not a known element. I'll +> bet some header needs to be added to make the dublin core stuff available. +> The atom feeds seem ok. --[[Joey]] + +
+Index: debian/changelog
+===================================================================
+--- debian/changelog	(revision 4066)
++++ debian/changelog	(working copy)
+@@ -15,8 +15,11 @@
+   * Updated French translation from Cyril Brulebois. Closes: #437181
+   * The toc directive doesn't work well or make sense inside an inlined page.
+     Disable it when the page with the toc is nested inside another page.
++  * Apply a patch from NicolasLimare adding modification date tags to rss and
++    atom feeds, and also changing the publication time for a feed to the
++    newest modiciation time (was newest creation time).
+ 
+- -- Joey Hess   Sat, 11 Aug 2007 17:40:45 -0400
++ -- Joey Hess   Sat, 11 Aug 2007 18:25:28 -0400
+ 
+ ikiwiki (2.5) unstable; urgency=low
+ 
+Index: templates/atomitem.tmpl
+===================================================================
+--- templates/atomitem.tmpl	(revision 4066)
++++ templates/atomitem.tmpl	(working copy)
+@@ -11,7 +11,8 @@
+ 	
+ 	
+ 	
+-	
++	
++	
+ 	
+ 	
+ 	
+Index: templates/rssitem.tmpl
+===================================================================
+--- templates/rssitem.tmpl	(revision 4066)
++++ templates/rssitem.tmpl	(working copy)
+@@ -12,7 +12,8 @@
+ 	
+ 	
+ 	
+-	
++	
++	
+ 	
+ 	
+ 	
+Index: IkiWiki/Plugin/inline.pm
+===================================================================
+--- IkiWiki/Plugin/inline.pm	(revision 4066)
++++ IkiWiki/Plugin/inline.pm	(working copy)
+@@ -361,8 +361,10 @@
+ 			title => pagetitle(basename($p)),
+ 			url => $u,
+ 			permalink => $u,
+-			date_822 => date_822($pagectime{$p}),
+-			date_3339 => date_3339($pagectime{$p}),
++			cdate_822 => date_822($pagectime{$p}),
++			mdate_822 => date_822($pagemtime{$p}),
++			cdate_3339 => date_3339($pagectime{$p}),
++			mdate_3339 => date_3339($pagemtime{$p}),
+ 		);
+ 
+ 		if ($itemtemplate->query(name => "enclosure")) {
+@@ -397,7 +399,7 @@
+ 		$content.=$itemtemplate->output;
+ 		$itemtemplate->clear_params;
+ 
+-		$lasttime = $pagectime{$p} if $pagectime{$p} > $lasttime;
++		$lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
+ 	}
+ 
+ 	my $template=template($feedtype."page.tmpl", blind_cache => 1);
+
— NicolasLimare