tested
parent
01fc1aef73
commit
98f08ddaab
|
@ -4,49 +4,186 @@ 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)).
|
element (whose datetime format is [iso 8601](http://www.w3.org/TR/NOTE-datetime)).
|
||||||
This patch updates :) `inline.pm` and the two relevant templates.
|
This patch updates :) `inline.pm` and the two relevant templates.
|
||||||
|
|
||||||
--- inline.pm.orig 2007-08-07 05:44:26.000000000 +0200
|
> I tested a slightly modified patch, which I've put below for now.
|
||||||
+++ inline.pm 2007-08-07 05:47:37.000000000 +0200
|
> feedvalidator.org complains that dc:modified is not a known element. I'll
|
||||||
@@ -362,7 +362,9 @@
|
> bet some header needs to be added to make the dublin core stuff available.
|
||||||
url => $u,
|
> The atom feeds seem ok. --[[Joey]]
|
||||||
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")) {
|
<pre>
|
||||||
@@ -397,7 +399,7 @@
|
Index: debian/changelog
|
||||||
$content.=$itemtemplate->output;
|
===================================================================
|
||||||
$itemtemplate->clear_params;
|
--- 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).
|
||||||
|
|
||||||
- $lasttime = $pagectime{$p} if $pagectime{$p} > $lasttime;
|
- -- Joey Hess <joeyh@debian.org> Sat, 11 Aug 2007 17:40:45 -0400
|
||||||
+ $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime;
|
+ -- Joey Hess <joeyh@debian.org> Sat, 11 Aug 2007 18:25:28 -0400
|
||||||
}
|
|
||||||
|
|
||||||
my $template=template($feedtype."page.tmpl", blind_cache => 1);
|
ikiwiki (2.5) unstable; urgency=low
|
||||||
--- atomitem.tmpl.orig 2007-08-07 05:44:43.000000000 +0200
|
|
||||||
+++ atomitem.tmpl 2007-08-07 05:46:14.000000000 +0200
|
Index: templates/atomitem.tmpl
|
||||||
@@ -11,7 +11,8 @@
|
===================================================================
|
||||||
<category term="<TMPL_VAR CATEGORY>" />
|
--- templates/atomitem.tmpl (revision 4066)
|
||||||
</TMPL_LOOP>
|
+++ templates/atomitem.tmpl (working copy)
|
||||||
</TMPL_IF>
|
@@ -11,7 +11,8 @@
|
||||||
- <updated><TMPL_VAR DATE_3339></updated>
|
<category term="<TMPL_VAR CATEGORY>" />
|
||||||
+ <updated><TMPL_VAR MDATE_3339></updated>
|
</TMPL_LOOP>
|
||||||
+ <published><TMPL_VAR DATE_3339></published>
|
</TMPL_IF>
|
||||||
<TMPL_IF NAME="ENCLOSURE">
|
- <updated><TMPL_VAR DATE_3339></updated>
|
||||||
<link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
|
+ <updated><TMPL_VAR MDATE_3339></updated>
|
||||||
<TMPL_ELSE>
|
+ <published><TMPL_VAR CDATE_3339></published>
|
||||||
--- rssitem.tmpl.orig 2007-08-07 05:44:58.000000000 +0200
|
<TMPL_IF NAME="ENCLOSURE">
|
||||||
+++ rssitem.tmpl 2007-08-07 06:06:36.000000000 +0200
|
<link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
|
||||||
@@ -5,6 +5,7 @@
|
<TMPL_ELSE>
|
||||||
<TMPL_ELSE>
|
Index: templates/rssitem.tmpl
|
||||||
<title><TMPL_VAR TITLE></title>
|
===================================================================
|
||||||
</TMPL_IF>
|
--- templates/rssitem.tmpl (revision 4066)
|
||||||
+ <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
|
+++ templates/rssitem.tmpl (working copy)
|
||||||
<guid><TMPL_VAR URL></guid>
|
@@ -12,7 +12,8 @@
|
||||||
<link><TMPL_VAR PERMALINK></link>
|
<category><TMPL_VAR CATEGORY></category>
|
||||||
<TMPL_IF NAME="CATEGORIES">
|
</TMPL_LOOP>
|
||||||
|
</TMPL_IF>
|
||||||
|
- <pubDate><TMPL_VAR DATE_822></pubDate>
|
||||||
|
+ <pubDate><TMPL_VAR CDATE_822></pubDate>
|
||||||
|
+ <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
|
||||||
|
<TMPL_IF NAME="ENCLOSURE">
|
||||||
|
<enclosure url="<TMPL_VAR ENCLOSURE>" type="<TMPL_VAR TYPE>" length="<TMPL_VAR LENGTH>" />
|
||||||
|
<TMPL_ELSE>
|
||||||
|
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);
|
||||||
|
Index: doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn
|
||||||
|
===================================================================
|
||||||
|
--- doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn (revision 4066)
|
||||||
|
+++ doc/bugs/correct_published_and_updated_time_information_for_the_feeds.mdwn (working copy)
|
||||||
|
@@ -4,50 +4,54 @@
|
||||||
|
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")) {
|
||||||
|
- @@ -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);
|
||||||
|
- --- 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 @@
|
||||||
|
- <category term="<TMPL_VAR CATEGORY>" />
|
||||||
|
- </TMPL_LOOP>
|
||||||
|
- </TMPL_IF>
|
||||||
|
- - <updated><TMPL_VAR DATE_3339></updated>
|
||||||
|
- + <updated><TMPL_VAR MDATE_3339></updated>
|
||||||
|
- + <published><TMPL_VAR DATE_3339></published>
|
||||||
|
- <TMPL_IF NAME="ENCLOSURE">
|
||||||
|
- <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
|
||||||
|
- <TMPL_ELSE>
|
||||||
|
- --- 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_ELSE>
|
||||||
|
- <title><TMPL_VAR TITLE></title>
|
||||||
|
- </TMPL_IF>
|
||||||
|
- + <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
|
||||||
|
- <guid><TMPL_VAR URL></guid>
|
||||||
|
- <link><TMPL_VAR PERMALINK></link>
|
||||||
|
- <TMPL_IF NAME="CATEGORIES">
|
||||||
|
+<pre>
|
||||||
|
+--- 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")) {
|
||||||
|
+@@ -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);
|
||||||
|
+--- 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 @@
|
||||||
|
+ <category term="<TMPL_VAR CATEGORY>" />
|
||||||
|
+ </TMPL_LOOP>
|
||||||
|
+ </TMPL_IF>
|
||||||
|
+- <updated><TMPL_VAR DATE_3339></updated>
|
||||||
|
++ <updated><TMPL_VAR MDATE_3339></updated>
|
||||||
|
++ <published><TMPL_VAR DATE_3339></published>
|
||||||
|
+ <TMPL_IF NAME="ENCLOSURE">
|
||||||
|
+ <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
|
||||||
|
+ <TMPL_ELSE>
|
||||||
|
+--- 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_ELSE>
|
||||||
|
+ <title><TMPL_VAR TITLE></title>
|
||||||
|
+ </TMPL_IF>
|
||||||
|
++ <dc:modified><TMPL_VAR MDATE_3339></dc:modified>
|
||||||
|
+ <guid><TMPL_VAR URL></guid>
|
||||||
|
+ <link><TMPL_VAR PERMALINK></link>
|
||||||
|
+ <TMPL_IF NAME="CATEGORIES">
|
||||||
|
+</pre>
|
||||||
|
|
||||||
|
— NicolasLimare
|
||||||
|
|
||||||
|
+[[done]], thanks --[[Joey]]
|
||||||
|
+
|
||||||
|
[[tag patch]]
|
||||||
|
</pre>
|
||||||
|
|
||||||
— NicolasLimare
|
— NicolasLimare
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue