]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
Merge remote-tracking branch 'schmonz/fancypodcast'
authorJoey Hess <joey@kitenet.net>
Sun, 21 Jul 2013 17:51:35 +0000 (13:51 -0400)
committerJoey Hess <joey@kitenet.net>
Sun, 21 Jul 2013 17:51:35 +0000 (13:51 -0400)
26 files changed:
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/meta.pm
doc/features.mdwn
doc/ikiwiki/directive/inline.mdwn
doc/ikiwiki/directive/meta.mdwn
doc/style.css
t/podcast.t [new file with mode: 0755]
t/tinypodcast/attempted_multiple_enclosures.mdwn [new file with mode: 0644]
t/tinypodcast/fancy.mdwn [new file with mode: 0644]
t/tinypodcast/piano.mp3 [new file with mode: 0644]
t/tinypodcast/pianopost.mdwn [new file with mode: 0644]
t/tinypodcast/scroll.3gp [new file with mode: 0644]
t/tinypodcast/simple.mdwn [new file with mode: 0644]
t/tinypodcast/simplepost.mdwn [new file with mode: 0644]
t/tinypodcast/walter.ogg [new file with mode: 0644]
templates/aggregatepost.tmpl
templates/atomitem.tmpl
templates/inlinepage.tmpl
templates/page.tmpl
templates/rssitem.tmpl
templates/rsspage.tmpl
themes/actiontabs/style.css
themes/blueview/style.css
themes/goldtype/style.css
themes/monochrome/style.css

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",
+                               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},
@@ -690,6 +691,9 @@ sub write_page ($$$$$) {
        }
        $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});
index 8eb033951a365ce2ada82394c94c8e903ae858df..455ac3ad55f4d468c80e5234816ba599f3527a33 100644 (file)
@@ -611,6 +611,26 @@ sub absolute_urls ($$) {
        return $ret;
 }
 
+sub genenclosure {
+       my $itemtemplate=shift;
+       my $url=shift;
+       my $file=shift;
+
+       return unless $itemtemplate->query(name => "enclosure");
+
+       my $size=(srcfile_stat($file))[8];
+       my $mime="unknown";
+       eval q{use File::MimeInfo};
+       if (! $@) {
+               $mime = mimetype($file);
+       }
+       $itemtemplate->param(
+               enclosure => $url,
+               type => $mime,
+               length => $size,
+       );
+}
+
 sub genfeed ($$$$$@) {
        my $feedtype=shift;
        my $feedurl=shift;
@@ -627,6 +647,7 @@ sub genfeed ($$$$$@) {
        foreach my $p (@pages) {
                my $u=URI->new(encode_utf8(urlto($p, "", 1)));
                my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
+               my $fancy_enclosure_seen = 0;
 
                $itemtemplate->param(
                        title => pagetitle(basename($p)),
@@ -648,32 +669,23 @@ sub genfeed ($$$$$@) {
                                $itemtemplate->param(mdate_822 => date_822($pagestate{$p}{meta}{updated}));
                                $itemtemplate->param(mdate_3339 => date_3339($pagestate{$p}{meta}{updated}));
                        }
-               }
 
-               if ($itemtemplate->query(name => "enclosure")) {
-                       my $file=$pagesources{$p};
-                       my $type=pagetype($file);
-                       if (defined $type) {
-                               $itemtemplate->param(content => $pcontent);
-                       }
-                       else {
-                               my $size=(srcfile_stat($file))[8];
-                               my $mime="unknown";
-                               eval q{use File::MimeInfo};
-                               if (! $@) {
-                                       $mime = mimetype($file);
-                               }
-                               $itemtemplate->param(
-                                       enclosure => $u,
-                                       type => $mime,
-                                       length => $size,
-                               );
+                       if (exists $pagestate{$p}{meta}{enclosure}) {
+                               my $absurl = $pagestate{$p}{meta}{enclosure};
+                               my $file = $pagestate{$p}{meta}{enclosurefile};
+                               genenclosure($itemtemplate, $absurl, $file);
+                               $fancy_enclosure_seen = 1;
                        }
                }
-               else {
-                       $itemtemplate->param(content => $pcontent);
+
+               my $file=$pagesources{$p};
+               unless ($fancy_enclosure_seen || defined(pagetype($file))) {
+                       genenclosure($itemtemplate, $u, $file);
+                       $itemtemplate->param(simplepodcast => 1);
                }
 
+               $itemtemplate->param(content => $pcontent);
+
                run_hooks(pagetemplate => sub {
                        shift->(page => $p, destpage => $page,
                                template => $itemtemplate);
@@ -694,6 +706,7 @@ sub genfeed ($$$$$@) {
                feeddesc => $feeddesc,
                guid => $guid,
                feeddate => date_3339($lasttime),
+               feeddate_822 => date_822($lasttime),
                feedurl => $feedurl,
        );
        run_hooks(pagetemplate => sub {
index 7ea70b5d19e17595e2a6b611dee1178347da7a81..e7b96bdf142f47e221e321b4ecb8ce68ab4989f8 100644 (file)
@@ -121,6 +121,18 @@ sub preprocess (@) {
                add_link($page, $value);
                return "";
        }
+       elsif ($key eq 'enclosure') {
+               my $link=bestlink($page, $value);
+               if (! length $link) {
+                       error gettext("enclosure not found")
+               }
+               add_depends($page, $link, deptype("presence"));
+
+               $value=urlto($link, $page, 1);
+               $pagestate{$page}{meta}{enclosure}=$value;
+               $pagestate{$page}{meta}{enclosurefile}=$link;
+               # fallthrough
+       }
        elsif ($key eq 'author') {
                $pagestate{$page}{meta}{author}=$value;
                if (exists $params{sortas}) {
@@ -318,6 +330,10 @@ sub pagetemplate (@) {
                $template->param(title_overridden => 1);
        }
 
+       if (exists $pagestate{$page}{meta}{enclosure}) {
+               $template->param(enclosure => HTML::Entities::encode_entities(IkiWiki::urlabs($pagestate{$page}{meta}{enclosure}, $config{url})));
+       }
+
        foreach my $field (qw{authorurl}) {
                eval q{use HTML::Entities};
                $template->param($field => HTML::Entities::encode_entities($pagestate{$page}{meta}{$field}))
index 66f7ecb7381383ac9b326779682643501e8dcd0e..5bbe5ef2190685c98a0c8a7b5d5f2d5553343a6e 100644 (file)
@@ -64,9 +64,11 @@ Ikiwiki can also [[plugins/aggregate]] external blogs, feeding them into
 the wiki. This can be used to create a Planet type site that aggregates
 interesting feeds.
 
-You can also mix blogging with podcasting by dropping audio files where
-they will be picked up like blog posts. This will work for any files that
-you would care to syndicate.
+You can also mix blogging with podcasting. Simply drop media files
+where they will be picked up like blog posts. For fuller-featured
+podcast feeds, enclose media files in blog posts using [[plugins/meta]].
+Either way, this will work for any files that you would care to
+syndicate.
 
 ## Valid html and [[css]]
 
index a9c241afc1859951975961347af6c490dbc292d4..c0d4e035b2a1bc2cde5bd0b079471f49d56e25e4 100644 (file)
@@ -11,7 +11,8 @@ Any pages that match the specified [[PageSpec]] (in the example, any
 [[SubPage]] of "blog") will be part of the blog, and the newest 10
 of them will appear in the page. Note that if files that are not pages
 match the [[PageSpec]], they will be included in the feed using RSS
-enclosures, which is useful for podcasting.
+enclosures, which is useful for simple podcasting; for fuller-featured
+podcast feeds, enclose media files in blog posts using [[meta]].
 
 The optional `rootpage` parameter tells the wiki that new posts to this
 blog should default to being [[SubPages|SubPage]] of "blog", and enables a
index 984f685402f28993eb7b1a11a761c3430eacd910..fbbffa575b5b858ced971313d8b38dd997bb2a18 100644 (file)
@@ -136,6 +136,11 @@ Supported fields:
   [[!iki plugins/htmlscrubber desc=htmlscrubber]] plugin is enabled, since it can be used to
   insert unsafe content.
 
+* enclosure
+
+  Specifies a link to a file to be rendered as an "enclosure" in
+  RSS/Atom feeds (and a plain old link in HTML). Useful for podcasting.
+
 * redir
 
   Causes the page to redirect to another page in the wiki.
index b52c72b6b694913394c77fad256b6b93d565ff5f..067a3bf7a65f4449bcd2452407c137dc5c27dc2b 100644 (file)
@@ -58,7 +58,8 @@ nav {
        border-bottom: 1px solid #000;
 }
 
-.inlinecontent {
+.inlinecontent,
+.inlineenclosure {
        margin-top: .4em;
 }
 
diff --git a/t/podcast.t b/t/podcast.t
new file mode 100755 (executable)
index 0000000..1052aea
--- /dev/null
@@ -0,0 +1,233 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+
+BEGIN {
+       eval q{use XML::Feed; use HTML::Parser; use HTML::LinkExtor};
+       if ($@) {
+               eval q{use Test::More skip_all =>
+                       "XML::Feed and/or HTML::Parser not available"};
+       }
+       else {
+               eval q{use Test::More tests => 136};
+       }
+}
+
+use Cwd;
+use File::Basename;
+
+my $tmp = 't/tmp';
+my $statedir = 't/tinypodcast/.ikiwiki';
+
+sub podcast {
+       my $podcast_style = shift;
+
+       my $baseurl = 'http://example.com';
+       my @command = (qw(./ikiwiki.out -plugin inline -rss -atom));
+       push @command, qw(-underlaydir=underlays/basewiki);
+       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+       push @command, "-url=$baseurl", qw(t/tinypodcast), "$tmp/out";
+
+       ok(! system("mkdir $tmp"),
+               q{setup});
+       ok(! system(@command),
+               q{build});
+
+       my %media_types = (
+               'simplepost'    => undef,
+               'piano.mp3'     => 'audio/mpeg',
+               'scroll.3gp'    => 'video/3gpp',
+               'walter.ogg'    => 'video/x-theora+ogg',
+       );
+
+       for my $format (qw(atom rss)) {
+               my $feed = XML::Feed->parse("$tmp/out/$podcast_style/index.$format");
+
+               is($feed->title, $podcast_style,
+                       qq{$format feed title});
+               is($feed->link, "$baseurl/$podcast_style/",
+                       qq{$format feed link});
+               is($feed->description, 'wiki',
+                       qq{$format feed description});
+               if ('atom' eq $format) {
+                       is($feed->author, $feed->description,
+                               qq{$format feed author});
+                       is($feed->id, $feed->link,
+                               qq{$format feed id});
+                       is($feed->generator, "ikiwiki",
+                               qq{$format feed generator});
+               }
+
+               for my $entry ($feed->entries) {
+                       my $title = $entry->title;
+                       my $url = $entry->id;
+                       my $body = $entry->content->body;
+                       my $enclosure = $entry->enclosure;
+
+                       is($entry->link, $url, qq{$format $title link});
+                       isnt($entry->issued, undef,
+                               qq{$format $title issued date});
+                       isnt($entry->modified, undef,
+                               qq{$format $title modified date});
+
+                       if (defined $media_types{$title}) {
+                               is($url, "$baseurl/$title",
+                                       qq{$format $title id});
+                               is($body, undef,
+                                       qq{$format $title no body text});
+                               is($enclosure->url, $url,
+                                       qq{$format $title enclosure url});
+                               is($enclosure->type, $media_types{$title},
+                                       qq{$format $title enclosure type});
+                               cmp_ok($enclosure->length, '>', 0,
+                                       qq{$format $title enclosure length});
+                       }
+                       else {
+                               # XXX hack hack hack
+                               my $expected_id = "$baseurl/$title/";
+                               $expected_id =~ s/\ /_/g;
+
+                               is($url, $expected_id,
+                                       qq{$format $title id});
+                               isnt($body, undef,
+                                       qq{$format $title body text});
+
+                               if ('fancy' eq $podcast_style) {
+                                       isnt($enclosure, undef,
+                                               qq{$format $title enclosure});
+                                       my $filename = basename($enclosure->url);
+                                       is($enclosure->type, $media_types{$filename},
+                                               qq{$format $title enclosure type});
+                                       cmp_ok($enclosure->length, '>', 0,
+                                               qq{$format $title enclosure length});
+                               }
+                               else {
+                                       is($enclosure, undef,
+                                               qq{$format $title no enclosure});
+                               }
+                       }
+               }
+       }
+
+       ok(! system("rm -rf $tmp $statedir"), q{teardown});
+}
+
+sub single_page_html {
+       my @command = (qw(./ikiwiki.out));
+       push @command, qw(-underlaydir=underlays/basewiki);
+       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+       push @command, qw(t/tinypodcast), "$tmp/out";
+
+       ok(! system("mkdir $tmp"),
+               q{setup});
+       ok(! system(@command),
+               q{build});
+
+       my $html = "$tmp/out/pianopost/index.html";
+       like(_extract_html_content($html, 'content'), qr/has content and/m,
+               q{html body text});
+       like(_extract_html_content($html, 'enclosure'), qr/Download/m,
+               q{html enclosure});
+       my ($href) = _extract_html_links($html, 'piano');
+       is($href, '/piano.mp3',
+               q{html enclosure sans -url is site-absolute});
+
+       $html = "$tmp/out/attempted_multiple_enclosures/index.html";
+       like(_extract_html_content($html, 'content'), qr/has content and/m,
+               q{html body text});
+       like(_extract_html_content($html, 'enclosure'), qr/Download/m,
+               q{html enclosure});
+       ($href) = _extract_html_links($html, 'walter');
+       is($href, '/walter.ogg',
+               q{html enclosure sans -url is site-absolute});
+
+       my $baseurl = 'http://example.com';
+       ok(! system(@command, "-url=$baseurl", q{--rebuild}));
+
+       $html = "$tmp/out/pianopost/index.html";
+       ($href) = _extract_html_links($html, 'piano');
+       is($href, "$baseurl/piano.mp3",
+               q{html enclosure with -url is fully absolute});
+
+       $html = "$tmp/out/attempted_multiple_enclosures/index.html";
+       ($href) = _extract_html_links($html, 'walter');
+       is($href, "$baseurl/walter.ogg",
+               q{html enclosure with -url is fully absolute});
+
+       ok(! system("rm -rf $tmp $statedir"), q{teardown});
+}
+
+sub inlined_pages_html {
+       my @command = (qw(./ikiwiki.out -plugin inline));
+       push @command, qw(-underlaydir=underlays/basewiki);
+       push @command, qw(-set underlaydirbase=underlays -templatedir=templates);
+       push @command, qw(t/tinypodcast), "$tmp/out";
+
+       ok(! system("mkdir $tmp"),
+               q{setup});
+       ok(! system(@command),
+               q{build});
+
+       my $html = "$tmp/out/fancy/index.html";
+       my $contents = _extract_html_content($html, 'content');
+       like($contents, qr/has content and an/m,
+               q{html body text from pianopost});
+       like($contents, qr/has content and only one/m,
+               q{html body text from attempted_multiple_enclosures});
+       my $enclosures = _extract_html_content($html, 'inlineenclosure');
+       like($enclosures, qr/Download/m,
+               q{html enclosure});
+       my ($href) = _extract_html_links($html, 'piano.mp3');
+       is($href, '/piano.mp3',
+               q{html enclosure from pianopost sans -url});
+       ($href) = _extract_html_links($html, 'walter.ogg');
+       is($href, '/walter.ogg',
+               q{html enclosure from attempted_multiple_enclosures sans -url});
+
+       ok(! system("rm -rf $tmp $statedir"), q{teardown});
+}
+
+sub _extract_html_content {
+       my ($file, $desired_id, $desired_tag) = @_;
+       $desired_tag = 'div' unless defined $desired_tag;
+
+       my $p = HTML::Parser->new(api_version => 3);
+       my $content = '';
+
+       $p->handler(start => sub {
+               my ($tag, $self, $attr) = @_;
+               return if $tag ne $desired_tag;
+               return unless exists $attr->{id} && $attr->{id} eq $desired_id;
+
+               $self->handler(text => sub {
+                       my ($dtext) = @_;
+                       $content .= $dtext;
+               }, "dtext");
+       }, "tagname,self,attr");
+
+       $p->parse_file($file) || die $!;
+
+       return $content;
+}
+
+sub _extract_html_links {
+       my ($file, $desired_value) = @_;
+
+       my @hrefs = ();
+
+       my $p = HTML::LinkExtor->new(sub {
+               my ($tag, %attr) = @_;
+               return if $tag ne 'a';
+               return unless $attr{href} =~ qr/$desired_value/;
+               push(@hrefs, values %attr);
+       }, getcwd() . '/' . $file);
+
+       $p->parse_file($file);
+
+       return @hrefs;
+}
+
+podcast('simple');
+single_page_html();
+inlined_pages_html();
+podcast('fancy');
diff --git a/t/tinypodcast/attempted_multiple_enclosures.mdwn b/t/tinypodcast/attempted_multiple_enclosures.mdwn
new file mode 100644 (file)
index 0000000..ea7bae8
--- /dev/null
@@ -0,0 +1,4 @@
+[[!meta enclosure="piano.mp3" enclosure="scroll.3gp"]]
+[[!meta enclosure="walter.ogg"]]
+
+this article has content _and_ only one enclosure!
diff --git a/t/tinypodcast/fancy.mdwn b/t/tinypodcast/fancy.mdwn
new file mode 100644 (file)
index 0000000..290f4c2
--- /dev/null
@@ -0,0 +1 @@
+[[!inline pages="pianopost or attempted_multiple_enclosures"]]
diff --git a/t/tinypodcast/piano.mp3 b/t/tinypodcast/piano.mp3
new file mode 100644 (file)
index 0000000..3d6b662
Binary files /dev/null and b/t/tinypodcast/piano.mp3 differ
diff --git a/t/tinypodcast/pianopost.mdwn b/t/tinypodcast/pianopost.mdwn
new file mode 100644 (file)
index 0000000..b02f8de
--- /dev/null
@@ -0,0 +1,3 @@
+[[!meta enclosure="piano.mp3"]]
+
+this article has content _and_ an enclosure!
diff --git a/t/tinypodcast/scroll.3gp b/t/tinypodcast/scroll.3gp
new file mode 100644 (file)
index 0000000..61e69e9
Binary files /dev/null and b/t/tinypodcast/scroll.3gp differ
diff --git a/t/tinypodcast/simple.mdwn b/t/tinypodcast/simple.mdwn
new file mode 100644 (file)
index 0000000..0523697
--- /dev/null
@@ -0,0 +1 @@
+[[!inline pages="simplepost or *.3gp or *.mov or *.mp3 or *.ogg"]]
diff --git a/t/tinypodcast/simplepost.mdwn b/t/tinypodcast/simplepost.mdwn
new file mode 100644 (file)
index 0000000..d28ddb5
--- /dev/null
@@ -0,0 +1 @@
+this article has content but no enclosure
diff --git a/t/tinypodcast/walter.ogg b/t/tinypodcast/walter.ogg
new file mode 100644 (file)
index 0000000..3eee48c
Binary files /dev/null and b/t/tinypodcast/walter.ogg differ
index 4e89efe3282082faf98f654294a31357422ff34b..a89ccfcdfdccfcbe5449eb59f518f145acc1c57e 100644 (file)
@@ -11,5 +11,9 @@
 <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>"]]
+</TMPL_IF>
 [[!meta authorurl="<TMPL_VAR URL ESCAPE=HTML>"]]
index 4ed17bc62070756b16e2dc1c6de3d10d0058de5e..9b056e0f455c06a06144d4c73922184441c1d3a6 100644 (file)
        <published><TMPL_VAR CDATE_3339></published>
 <TMPL_IF ENCLOSURE>
        <link rel="enclosure" type="<TMPL_VAR TYPE>" href="<TMPL_VAR ENCLOSURE>" length="<TMPL_VAR LENGTH>" />
-<TMPL_ELSE>
+</TMPL_IF>
+<TMPL_UNLESS SIMPLEPODCAST>
        <content type="html" xml:lang="en">
        <TMPL_VAR CONTENT ESCAPE=HTML>
        </content>
-</TMPL_IF>
+</TMPL_UNLESS>
 <TMPL_IF COMMENTSURL>
        <link rel="comments" href="<TMPL_VAR COMMENTSURL>" type="text/html" />
 </TMPL_IF>
index b0b53d0416db76d2dc24bb606c5e86755dee93ef..37d7e48c135b430b47308b8f5c3f4b1b4446e5ce 100644 (file)
 <TMPL_VAR CONTENT>
 <TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
+<TMPL_IF ENCLOSURE>
+<TMPL_IF HTML5><section id="inlineenclosure"><TMPL_ELSE><div id="inlineenclosure"></TMPL_IF>
+<a href="<TMPL_VAR ENCLOSURE>">Download</a>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
+</TMPL_IF>
+
 <TMPL_IF HTML5><footer class="inlinefooter"><TMPL_ELSE><div class="inlinefooter"></TMPL_IF>
 
 <span class="pagedate">
index 6353c75969154bc14f10895c48b342a43e763a23..c886b22d81d53069fd10ff290dbddb672d093566 100644 (file)
 <TMPL_VAR CONTENT>
 <TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
 
+<TMPL_IF ENCLOSURE>
+<TMPL_IF HTML5><section id="enclosure"><TMPL_ELSE><div id="enclosure"></TMPL_IF>
+<a href="<TMPL_VAR ENCLOSURE>">Download</a>
+<TMPL_IF HTML5></section><TMPL_ELSE></div></TMPL_IF>
+</TMPL_IF>
+
 <TMPL_UNLESS DYNAMIC>
 <TMPL_IF COMMENTS>
 <TMPL_IF HTML5><section id="comments"><TMPL_ELSE><div id="comments"></TMPL_IF>
index 831daa871d11369b7b5c532014fbfab2b478c550..bb03ca5bcf9be23c9f52d9e81fd3072ec2ab50f7 100644 (file)
@@ -1,16 +1,14 @@
 <item>
-<TMPL_IF AUTHOR>
-       <title><TMPL_VAR AUTHOR ESCAPE=HTML>: <TMPL_VAR TITLE></title>
-       <dcterms:creator><TMPL_VAR AUTHOR ESCAPE=HTML></dcterms:creator>
-<TMPL_ELSE>
        <title><TMPL_VAR TITLE></title>
-</TMPL_IF>
 <TMPL_IF GUID>
        <guid isPermaLink="false"><TMPL_VAR GUID></guid>
 <TMPL_ELSE>
        <guid isPermaLink="false"><TMPL_VAR URL></guid>
 </TMPL_IF>
        <link><TMPL_VAR PERMALINK></link>
+<TMPL_IF AUTHOR>
+       <dc:creator><TMPL_VAR AUTHOR ESCAPE=HTML></dc:creator>
+</TMPL_IF>
 <TMPL_IF CATEGORIES>
 <TMPL_LOOP CATEGORIES>
        <category><TMPL_VAR CATEGORY></category>
        <dcterms:modified><TMPL_VAR MDATE_3339></dcterms:modified>
 <TMPL_IF ENCLOSURE>
        <enclosure url="<TMPL_VAR ENCLOSURE>" type="<TMPL_VAR TYPE>" length="<TMPL_VAR LENGTH>" />
-<TMPL_ELSE>
-       <description><TMPL_VAR CONTENT ESCAPE=HTML></description>
 </TMPL_IF>
+<TMPL_UNLESS SIMPLEPODCAST>
+       <description><TMPL_VAR CONTENT ESCAPE=HTML></description>
+</TMPL_UNLESS>
 <TMPL_IF COMMENTSURL>
        <comments><TMPL_VAR COMMENTSURL></comments>
 </TMPL_IF>
index e54094aaa2f1ddbc7e7b1cde73827eca9ad7da89..45265f2654d0c5a1b16156b7e65b49254654faf3 100644 (file)
@@ -5,7 +5,12 @@
 <channel>
 <title><TMPL_VAR TITLE></title>
 <link><TMPL_VAR PAGEURL></link>
+<TMPL_IF COPYRIGHT>
+<copyright><TMPL_VAR COPYRIGHT ESCAPE=HTML></copyright>
+</TMPL_IF>
 <description><TMPL_VAR FEEDDESC ESCAPE=HTML></description>
+<generator>ikiwiki</generator>
+<pubDate><TMPL_VAR FEEDDATE_822></pubDate>
 <TMPL_VAR CONTENT>
 </channel>
 </rss>
index f6cb5c04e1e0e011641464d54fcb718297c7eae6..d4afc0915b86a44ce2ad20d5d9e574e17abae945 100644 (file)
@@ -76,7 +76,7 @@ body {
        padding: 2px;
 }
 
-#content, #comments, #footer {
+#content, #enclosure, #comments, #footer {
        margin: 1em 2em;
 }
 
index 40a940f265a94f77be5191b124bbb321f3080b45..af1434574b537259e4bbf77fee8780788fe18856 100644 (file)
@@ -143,7 +143,7 @@ p,fieldset,table,pre {
  * Copyright (C) 2010 Bernd Zeimetz
  * Licensed under same license as ikiwiki: GPL v2 or later */
 
-.page, .pageheader, .sidebar, #content, #comments, .inlinepage, .recentchanges, .pageheader .actions ul, #pagebody {
+.page, .pageheader, .sidebar, #content, #enclosure, #comments, .inlinepage, .recentchanges, .pageheader .actions ul, #pagebody {
        border: none;
 }
 
@@ -223,7 +223,7 @@ body {
        clear: none;
 }
 
-#content a, #comments a, .sidebar a {
+#content a, #enclosure a, #comments a, .sidebar a {
        color: #315485;
        text-decoration: none;
        font-weight: bold;
@@ -271,7 +271,7 @@ body {
        .pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a {
                color #315485;
        }
-       #content, #comments, #pagebody {
+       #content, #enclosure, #comments, #pagebody {
                margin-right: 0;
                *margin-right: 0;
                border-right: none;
index 9c217c746a065c48ccb080efc263419a375c5bd4..b0e29dfad6e6f7cfdc2849c2a16f214b66a74faa 100644 (file)
@@ -14,10 +14,12 @@ html, body {
        background-color: #f2d98d;
 }
 
-#content a:hover, #comments a:hover, .sidebar a:hover,
-#content a:visited:hover, #comments a:visited:hover, .sidebar a:visited:hover {
+#content a:hover, #enclosure a:hover, #comments a:hover, .sidebar a:hover,
+#content a:visited:hover, #enclosure a:visited:hover, #comments a:visited:hover,
+.sidebar a:visited:hover {
     color: red;
 }
-#content a:visited, #comments a:visited, .sidebar a:visited {
+#content a:visited, #enclosure a:visited, #comments a:visited,
+.sidebar a:visited {
     color: #37485e;
 }
index 41a3a4441f7ce219ccf6c4ef752088e07f5c9002..bd3fdf5939c5a7754f7c08b1885ad8301e7b825e 100644 (file)
@@ -36,12 +36,16 @@ body {
  * thanks to <http://www.kryogenix.org/days/2002/08/30/external>
  */
 #content a[href^="http:"]:after,
-#content a[href^="https:"]:after {
+#content a[href^="https:"]:after,
+#enclosure a[href^="http:"]:after,
+#enclosure a[href^="https:"]:after {
   content: "↗";
 }
 /* you will want to replicate this for your own domain in local.css */
 #content a[href^="http://localhost"]:after,
-#content a[href^="http://ikiwiki.info"]:after {
+#content a[href^="http://ikiwiki.info"]:after,
+#enclosure a[href^="http://localhost"]:after,
+#enclosure a[href^="http://ikiwiki.info"]:after {
   content: none;
 }