Skip to content

clivewalkden/jigsaw-sitemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jigsaw Sitemap

Latest version Quality Score PSR2 Conformance

Sitemap and sitemap index builder for Jigsaw.


Usage

Add as an event listener in bootstrap.php.

use CliveWalkden\JigsawSitemap\SitemapListener;

/**
 * An afterBuild event is fired after the build is complete, and all output files
 * have been written to the build directory. This allows you to obtain a list of
 * the output file paths (to use, for example, when creating a sitemap.xml file),
 * programmatically create output files, or take care of any other post-processing tasks.
 *
 * @link http://jigsaw.tighten.co/docs/event-listeners/
 */
$events->afterBuild([
    SitemapListener::class,
]);

Note: You can exclude files from the sitemap by adding the following to your config.php:

'sitemap' => [
    'url_trailing_slash' => true,
    'exclude' => [
        '.htaccess',
        'favicon.ico',
        // ...
    ],
    'image_sitemap' => [
        'generate' => true,
        'filename' => 'sitemap_images.xml',
        'extensions' => [
            'gif',
            'jpg',
            'jpeg',
            'png',
            // ...
        ]
    ]
],

Laravel 6 Updates (Jigsaw 1.3.16+)

Updates to make the plugin work with Laravel 6 components used in Jigsaw 1.3.16+ were made by Clive Walkden. All previous work was done by Ryan Scherler.

Changelog

To see the changelog open CHANGELOG.md