I’ve added Bruno Meilick’s kirby3-feed plugin to my webcomic site using the Virtual Page configuration option, and it works great. I’m pulling the feed items directly from a collection that contains a filtered set of content from my site, and the feed is showing the item titles which, when clicked, redirect correctly to the relevant page on the site.
Here’s what the configuration file looks like:
<?php
return [
'debug' => true,
'routes' => [
[
'pattern' => 'feed',
'method' => 'GET',
'action' => function () {
$options = [
'title' => 'Latest Comics',
'description' => 'Read the latest Skeleton Crew comics',
'link' => 'comic',
'description' => '', // comic image should go here
];
$feed = collection("all-comics")->feed($options);
return $feed;
}
]
]
];
Each item in the feed is a comic strip, so I’d like to use the comic image as the description for each RSS entry. This is how I access the images currently:
$page()->files()->findBy('template', 'main-image');
Does anyone know how I might achieve that in the format that the virtual page configuration can parse?