Installation
Install package
Add the package in your composer.json
by executing the command.
Configure dependencies
spatie/sheets
Stancy uses spatie/sheets as base - a sheet is the data file which is used to fill a page. By default sheets can be Markdown (with YAML frontmatter), JSON or YAML files. But you can define your own content parsers. To use sheets you have to create a collection which is a folder that contains your sheets. You can define as much collections as you want.
spatie/laravel-feeds
Stancy comes with feed (Atom & RSS) support which is provided by spatie/laravel-feeds. A feed is generated from a sheet collection. Below is an example feed configuration which uses the \Astrotomic\Stancy\Contracts\FeedFactory
.
spatie/laravel-export
Stancy integrates spatie/laravel-export to generate static files. You can configure the exporter in the config file or use the \Astrotomic\Stancy\Contracts\ExportFactory
to add your pages programmatically. We recommend to disable the crawl
option in the config/export.php
and use the export factory to add pages to your export list.
Last updated