Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Latest commit

 

History

History
33 lines (23 loc) · 703 Bytes

readme.md

File metadata and controls

33 lines (23 loc) · 703 Bytes

Jigsaw Sitemap

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();