]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Show author in addition to feedname, if different.
authorAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Wed, 17 Jul 2013 20:38:08 +0000 (16:38 -0400)
committerAmitai Schlair <schmonz-web-ikiwiki@schmonz.com>
Wed, 17 Jul 2013 20:38:08 +0000 (16:38 -0400)
While here, mollify http://validator.w3.org/feed/ and
s/dcterms:creator/dc:creator/g, which happens to make rss2email see
and do nice things with authors.

IkiWiki/Plugin/aggregate.pm
templates/aggregatepost.tmpl
templates/rssitem.tmpl

index 89da5c453aa7e36143ad46271d053f446215b15d..be6e8d47677506d254990c1385f314a9731583c3 100644 (file)
@@ -593,6 +593,7 @@ sub aggregate (@) {
                                feed => $feed,
                                copyright => $f->copyright,
                                title => defined $entry->title ? decode_entities($entry->title) : "untitled",
                                feed => $feed,
                                copyright => $f->copyright,
                                title => defined $entry->title ? decode_entities($entry->title) : "untitled",
+                               author => defined $entry->author ? decode_entities($entry->author) : "",
                                link => $entry->link,
                                content => (defined $c && defined $c->body) ? $c->body : "",
                                guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
                                link => $entry->link,
                                content => (defined $c && defined $c->body) ? $c->body : "",
                                guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
@@ -690,6 +691,9 @@ sub write_page ($$$$$) {
        }
        $template->param(title => $params{title})
                if defined $params{title} && length($params{title});
        }
        $template->param(title => $params{title})
                if defined $params{title} && length($params{title});
+       $template->param(author => $params{author})
+               if defined $params{author} && length($params{author}
+                       && $params{author} ne $feed->{name});
        $template->param(content => wikiescape(htmlabs($params{content},
                defined $params{base} ? $params{base} : $feed->{feedurl})));
        $template->param(name => $feed->{name});
        $template->param(content => wikiescape(htmlabs($params{content},
                defined $params{base} ? $params{base} : $feed->{feedurl})));
        $template->param(name => $feed->{name});
index 4e89efe3282082faf98f654294a31357422ff34b..a89ccfcdfdccfcbe5449eb59f518f145acc1c57e 100644 (file)
@@ -11,5 +11,9 @@
 <TMPL_IF COPYRIGHT>
 [[!meta copyright="<TMPL_VAR COPYRIGHT ESCAPE=HTML>"]]
 </TMPL_IF>
 <TMPL_IF COPYRIGHT>
 [[!meta copyright="<TMPL_VAR COPYRIGHT ESCAPE=HTML>"]]
 </TMPL_IF>
+<TMPL_IF AUTHOR>
+[[!meta author="<TMPL_VAR NAME ESCAPE=HTML>: <TMPL_VAR AUTHOR ESCAPE=HTML>"]]
+<TMPL_ELSE>
 [[!meta author="<TMPL_VAR NAME ESCAPE=HTML>"]]
 [[!meta author="<TMPL_VAR NAME ESCAPE=HTML>"]]
+</TMPL_IF>
 [[!meta authorurl="<TMPL_VAR URL ESCAPE=HTML>"]]
 [[!meta authorurl="<TMPL_VAR URL ESCAPE=HTML>"]]
index 9acefb5d3aab81ac182b2b83e38b7658d458c693..bb03ca5bcf9be23c9f52d9e81fd3072ec2ab50f7 100644 (file)
@@ -7,7 +7,7 @@
 </TMPL_IF>
        <link><TMPL_VAR PERMALINK></link>
 <TMPL_IF AUTHOR>
 </TMPL_IF>
        <link><TMPL_VAR PERMALINK></link>
 <TMPL_IF AUTHOR>
-       <dcterms:creator><TMPL_VAR AUTHOR ESCAPE=HTML></dcterms:creator>
+       <dc:creator><TMPL_VAR AUTHOR ESCAPE=HTML></dc:creator>
 </TMPL_IF>
 <TMPL_IF CATEGORIES>
 <TMPL_LOOP CATEGORIES>
 </TMPL_IF>
 <TMPL_IF CATEGORIES>
 <TMPL_LOOP CATEGORIES>