🚀
Stancy
  • Introduction
  • Issues
  • Changelog
  • Installation
  • Getting started
  • Basics
    • Content
    • PageData
    • Make Page Command
  • Advanced
    • Feed Atom/RSS
    • Sitemap
    • static export
  • Webserver
    • 🚧nginx
    • 🚧caddy
  • Services
    • GitHub Actions
    • 🚧GitHub Pages
    • Netlify
    • 🚧sitesauce
    • 🚧forestry
Powered by GitBook
On this page
  • Feed configuration
  • Feed links

Was this helpful?

  1. Advanced

Feed Atom/RSS

PreviousMake Page CommandNextSitemap

Last updated 5 years ago

Was this helpful?

Stancy can generate feeds using . 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
<?php

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',
        ],
    ],
];

Feed links

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

@include('feed::links')
spatie/laravel-feed