https://github.com/arkdevuk/sitemap-builder
a simple php tool to create sitemap for google bots
https://github.com/arkdevuk/sitemap-builder
Last synced: 12 months ago
JSON representation
a simple php tool to create sitemap for google bots
- Host: GitHub
- URL: https://github.com/arkdevuk/sitemap-builder
- Owner: arkdevuk
- Created: 2021-06-21T23:06:03.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-23T10:44:41.000Z (over 4 years ago)
- Last Synced: 2024-12-31T02:44:31.707Z (about 1 year ago)
- Language: PHP
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://packagist.org/packages/arkdevuk/sitemap-builder) [](https://packagist.org/packages/arkdevuk/sitemap-builder) [](https://packagist.org/packages/arkdevuk/sitemap-builder) [](https://packagist.org/packages/arkdevuk/sitemap-builder) [](/docs/requirements/)
# Sitemap-build
a simple tool to generate sitemaps for google's bots
## USAGE
as simple as this :
```php
setLocation('/test')
->setChangeFrequency(SitemapEntry::CHANGE_WEEKLY)
->setPriority(1)
->setLastModDateTime(new \DateTime('2020-12-10'));
$media = new SitemapEntryImage($baseUrl.'/assets/images/image.jpeg');
$media
->setCaption('A test image for the purpose of the example')
->setGeoLocation('Aurillac, Cantal, France')
->setTitle('Image Title')//->setLicence('https://creativecommons.org/licenses/by-nc-nd/4.0/')
;
$entry->setMedia($media);
$sitemap->addEntry($entry);
$container->addSitemap($sitemap);
$container->compile();
```