summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakesite.pl6
-rw-r--r--template/rss.xml3
2 files changed, 5 insertions, 4 deletions
diff --git a/makesite.pl b/makesite.pl
index fa55cf8..77ab6f1 100755
--- a/makesite.pl
+++ b/makesite.pl
@@ -110,8 +110,8 @@ open my $outHandle, ">", "output/rss.xml";
# Write channel info and insert publication and build dates
open my $inHandle, "<", "template/rss.xml";
my $pubDate = Time::Piece->strptime($articleList[$#articleList]{date}, "%m-%d-%Y"); # Last article date
-$pubDate = $pubDate->strftime();
-my $buildDate = gmtime->strftime(); # Current date
+$pubDate = $pubDate->strftime("%a, %d %b %Y %H:%M:%S %z");
+my $buildDate = gmtime->strftime("%a, %d %b %Y %H:%M:%S %z"); # Current date
while(<$inHandle>) {
$_ =~ s/\$link/$BASE_URL/;
$_ =~ s/\$pubDate/$pubDate/;
@@ -123,7 +123,7 @@ for(my $i = $#articleList; $i >= 0; $i--) {
open my $inHandle, "<", "template/rss-item.xml";
my $url = $BASE_URL . $articleList[$i]{address};
my $pubDate = Time::Piece->strptime($articleList[$i]{date}, "%m-%d-%Y");
- $pubDate = $pubDate->strftime();
+ $pubDate = $pubDate->strftime("%a, %d %b %Y %H:%M:%S %z");
while(<$inHandle>) {
$_ =~ s/\$title/$articleList[$i]{title}/;
$_ =~ s/\$link/$url/;
diff --git a/template/rss.xml b/template/rss.xml
index 4f519ac..61f0df9 100644
--- a/template/rss.xml
+++ b/template/rss.xml
@@ -1,7 +1,8 @@
-<rss version="2.0">
+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>blog.vdouillet.fr</title>
<link>$link</link>
+<atom:link href="$linkrss.xml" rel="self" type="application/rss+xml" />
<description>Humble ramblings about IT and occasionally other topics</description>
<language>en-us</language>
<pubDate>$pubDate</pubDate>