From 2a81482dd6d2a17a253e83becc6a042010680c9d Mon Sep 17 00:00:00 2001 From: Vincent Douillet Date: Thu, 20 Feb 2025 21:51:12 +0100 Subject: rss feed: pass w3c validation service --- makesite.pl | 6 +++--- template/rss.xml | 3 ++- 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 @@ - + blog.vdouillet.fr $link + Humble ramblings about IT and occasionally other topics en-us $pubDate -- cgit v1.2.3