Jigsaw Sitemap Plugin is an easy and straight forward plugin
to be used on Jigsaw's afterBuild
event.
It fetches all generated pages and generates a sitemap file containing such entries based on configurations.
On your Jigsaw project, require this package:
$ composer require nawarian/jigsaw-sitemap-plugin
On your bootstrap.php
file, register the Listener:
use Nawarian\JigsawSitemapPlugin\Listener\SitemapListener;
/** @var $container \Illuminate\Container\Container */
/** @var $events \TightenCo\Jigsaw\Events\EventBus */
$events->afterBuild([SitemapListener::class]);
After running the build you should see a sitemap.xml
file
inside build's output folder.