artisan / jigsaw-sitemap
A site map hook for Jigsaw CMS.
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
pkg:composer/artisan/jigsaw-sitemap
Requires
- spatie/array-to-xml: ^2.7
This package is auto-updated.
Last update: 2019-10-03 22:19:50 UTC
README
This package is still in development, use at your own risk.
Usage
Install the package.
composer install artisan/jigsaw-sitemap
Make sure to add the source/sitemap.xml
to your gitignore to avoid having to commit it every time it builds.
Set up the sitemap on your bootstrap.php
file.
use Artisan\Jigsaw\Sitemap; (new Sitemap($container))->collections('posts')->create();
You can also add some defaults for those special URLs:
(new Sitemap($container))->fill([ [ 'loc' => 'https://example.com', 'lastmod' => '2014-01-1', 'changefreq' => 'weekly', ] ])->collections('posts', 'donuts')->create();