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.
config/feed.php
1
<?php
2
​
3
use Astrotomic\Stancy\Contracts\FeedFactory;
4
​
5
return [
6
'feeds' => [
7
'blog' => [
8
'items' => [FeedFactory::class.'@makeFromSheetCollectionName', 'blog'],
9
'url' => 'feed/blog.atom',
10
'title' => 'Stancy Blog Feed',
11
'description' => 'This is the Stancy blog feed.',
12
'language' => 'en-US',
13
'view' => 'feed::atom',
14
'type' => 'application/atom+xml',
15
],
16
],
17
];
Copied!

Feed links

You can generate alternate link tags for all your configured feeds and include them in your blade view.
1
@include('feed::links')
Copied!
Last modified 2yr ago