🐛 (rss) Only include published/listed articles

This commit is contained in:
Marcel Kapfer 2024-03-20 18:21:47 +01:00
parent 0b1949d8e1
commit ef1919decf
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09

View file

@ -2,7 +2,12 @@
$kirby->response()->type('application/rss+xml');
$articles = $page->children()->template('article')->sortBy('date', 'desc')->limit(10);
$articles = $page
->children()
->template('article')
->listed()
->sortBy('date', 'desc')
->limit(10);
$writer = new XMLWriter();
$writer->openMemory();