static export
Last updated
Was this helpful?
Last updated
Was this helpful?
Stancy integrates to export your pages as static files.
We recommend to disable the crawl
option and export only listed paths/pages. The paths
option can be empty if you only want to export feeds and/or pages. But you also can add additional paths, like the sitemap, to export.
By default you can't export any page, only the feeds. To allow page export you have to implement the \Astrotomic\Stancy\Contracts\Routable
interface in your . This interface is also good to add your pages to a and .
To add your pages programmatically you should use a service provider. This service provider should be the last or at least after \App\Providers\RouteServiceProvider
in your app.providers
configuration. In the service provider you should use the boot()
method where you can inject the \Astrotomic\Stancy\Contracts\ExportFactory
service and add a new booted
event listener.
This service provider will add all , blog posts and the home
and blog
static pages.