Download the PHP package webarchitect609/sitemap without Composer
On this page you can find all versions of the php package webarchitect609/sitemap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webarchitect609/sitemap
More information about webarchitect609/sitemap
Files in webarchitect609/sitemap
Package sitemap
Short Description Generate sitemap.xml with respect to robots.txt disallow rules, according specification https://www.sitemaps.org and without dependencies from any framework or cms.
License MIT
Informations about the package sitemap
Sitemap generation and deploy tool
Be careful: this version can be unstable and all interfaces can be changed in near future.
Features
- Respect of Sitemaps XML format and it's limits;
- Sitemapindex is always supported;
- Automatic setup 'lastmod' for sitemap in sitemapindex with the most fresh 'lastmod' from it's urls;
- Automatic adding hostname for urls;
- Respect of robots.txt
Disallow
rules for '*' agent to help you avoid undesired urls in your sitemap; - Write to a temporary folder and deploy to final destination to avoid damaging old copy in a case of troubles;
- No dependencies from any framework;
How to use
1 Install via composer
composer require webarchitect609/sitemap
2 Create writer instance
$sitemapWriter = new \WebArch\Sitemap\SitemapWriter('http://example.org', '/var/www/example.org/htdocs');
3 For simple usage just start to add urls directly to writer
4 For more complicated case you can create as many sitemaps as you need and give them to writer:
5 Additional options can be applied to respect sitemap limitations
6 And then just let it work
After this everything will be written to sys_get_temp_dir()
. If there were no errors new version of sitemapindex + all
sitemaps will be deployed to it's final destination at $sitemapWriter->getBaseDir()
and file permissions will be
changed in a way to let everybody read them.
Running Unit-tests
composer test
All versions of sitemap with dependencies
doctrine/cache Version ^1.6
doctrine/collections Version ^1.4
jms/serializer Version ^1.12
psr/log Version ^1.0
vipnytt/robotstxtparser Version ^2.0