Created
December 2, 2009 07:02
-
-
Save fujiwara/247010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/data/base.xml b/data/base.xml | |
index 333a0f9..f0dcb52 100644 | |
--- a/data/base.xml | |
+++ b/data/base.xml | |
@@ -1,4 +1,5 @@ | |
? use DateTime::Format::HTTP; | |
+? my $today = DateTime->now(); | |
<?= encoded_string qq[<\?xml version="1.0" encoding="utf-8"?\>] ?> | |
<rss version="2.0" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
@@ -10,6 +11,7 @@ | |
<description><? block description => '' ?></description> | |
? my @entries = sort { $b->filename cmp $a->filename } @{ $page->entries || [] }; | |
? for my $entry (splice @entries, 0, 15) { | |
+? next if $entry->datetime > $today; | |
<item> | |
<title><?= $entry->title ?></title> | |
<link><? block 'link' ?><?= substr $entry->path, 1 ?>/<?= $entry->filename ?>.html</link> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment