Feed Atom/RSS

Stancy can generate feeds using spatie/laravel-feed. It allows you to generate a feed for a whole page collection.

Feed configuration

The package provides a feed factory which enables you to generate your feed by passing the page collection name.


use Astrotomic\Stancy\Contracts\FeedFactory;

return [
    'feeds' => [
        'blog' => [
            'items' => [FeedFactory::class.'@makeFromSheetCollectionName', 'blog'],
            'url' => 'feed/blog.atom',
            'title' => 'Stancy Blog Feed',
            'description' => 'This is the Stancy blog feed.',
            'language' => 'en-US',
            'view' => 'feed::atom',
            'type' => 'application/atom+xml',

You can generate alternate link tags for all your configured feeds and include them in your blade view.


Last updated