laravelsimplesitemap maintained by lucacri
Description
A Laravel package to create simple sitemaps
Author
Last update
2024/04/24 20:08
(dev-main)
License
Downloads
2 153
Tags
A Laravel package to create simple sitemaps
A very simple package to create sitemaps from specific URLs
Installation
You can install the package via composer:
composer require lucacri/laravelsimplesitemap
You can publish and run the migrations with:
php artisan vendor:publish --tag="laravelsimplesitemap-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="laravelsimplesitemap-config"
This is the contents of the published config file:
return [
/*
* Storage disk and path where to save the sitemap
*
*/
'save' => [
'disk' => 'public',
'path' => 'sitemap.xml'
],
/*
* The URL where your sitemap will be accessible.
* This value will be used to inform Google of the changed sitemap
*
*/
'sitemap_url' => 'http://example.com/sitemap.xml',
/*
* An array of URLs to include in the sitemap
* Example:
* [
'loc' => 'https://example.com',
'changefreq' => 'weekly',
'priority' => 0.9
]
*/
'urls' => [
// example
[
'loc' => 'https://example.com',
'changefreq' => 'weekly',
'priority' => 0.9
]
]
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="laravelsimplesitemap-views"
Usage
php artisan simplesitemap:create --ping-google
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.