nieuws/feed: prefer article dates from metadata
[minimedit.git] / nieuws / feed / index.php
index f2c62afdb05d3466c5c1fa93777ecb883ca81d81..0cd5ecb84e016df6ed7fb55ffca9eac059edae43 100644 (file)
@@ -11,6 +11,7 @@ $siteref = (empty($_SERVER['HTTPS']) ? 'http' : 'https') . '://' . $_SERVER['HTT
        <id><?= $siteref ?>/</id>
        <link href="<?= $siteref ?>/" />
        <link href="<?= $siteref . $_SERVER['REQUEST_URI'] ?>" rel="self" />
+       <icon>/favicon.png</icon>
        <author><name>Lijtweg</name></author>
 <?php
 $root = preg_replace('{/feed$}', '', $Page) . "/2???";
@@ -28,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));