nieuws/feed: atom content type and link attributes
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 3 Sep 2018 20:58:31 +0000 (22:58 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 3 Sep 2018 21:24:18 +0000 (23:24 +0200)
nieuws/feed/index.php
nieuws/index.php

index 128aa5acc9561d665ffde7fbfd05211cb823d19d..67687f31419c81255157fd4ce23c927d9e411cf1 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 ob_clean();
+header('Content-Type', 'application/atom+xml');
 print '<?xml version="1.0" encoding="utf-8"?>';
 $siteref = 'http://'.$_SERVER['HTTP_HOST'];
 ?>
index b4191cee8898d6b275f20e02ba4dd2c8719f8bd0..4da5a8bc9c22895cc66ddf0906fb6228875d82bd 100644 (file)
@@ -40,7 +40,10 @@ if ($year) {
 }
 
 $html = ob_get_clean();
-printf('<div class="nav right"><a href="%s">Feed</a></div>'."\n", "/$Page/feed");
+printf('<div class="nav right"><a href="%s"%s>Feed</a></div>'."\n",
+       "/$Page/feed",
+       ' rel="alternate" title="Atom feed van nieuwsberichten" type="application/atom+xml"'
+);
 print $html;
 
 print '<div id="news">'."\n\n";