nieuws/feed: prefer article dates from metadata
authorMischa POSLAWSKY <perl@shiar.org>
Thu, 3 Dec 2020 02:49:20 +0000 (03:49 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 5 Dec 2020 00:41:21 +0000 (01:41 +0100)
Frequently available since the previous commit.

nieuws/feed/index.php

index a5a5eeef2137a6df022ec8a29328fe3b65c1f645..0cd5ecb84e016df6ed7fb55ffca9eac059edae43 100644 (file)
@@ -29,8 +29,8 @@ foreach ($pages as $i => $page) {
                <id><?= $siteref . '/' . $article->link ?></id>
                <link href="<?= $siteref . '/' . $article->link ?>" />
                <title><?= $article->title ?></title>
-               <published><?= $article->dateiso ?></published>
-               <updated><?= $article->dateiso ?></updated>
+               <published><?= $article->meta['article:published_time'] ?? $article->dateiso ?></published>
+               <updated><?= $article->meta['article:modified_time'] ?? $article->dateiso ?></updated>
 <?php
        if ($article->teaser) {
                printf("\t\t<summary>%s</summary>\n", htmlspecialchars($article->teaser));