prolificrohit/sitemaps
最新稳定版本:1.0.2
Composer 安装命令:
composer require prolificrohit/sitemaps
包简介
A simple, scalable, highly extensible and seo friendly php sitemap generator.
关键字:
README 文档
README
A simple, scalable, highly extensible and seo friendly php sitemap generator. It also supports image sitemap.
Installation
You can install the package through composer:
composer require prolificrohit/sitemaps
Examples
-
For any array of urls:
$sitemap = new Sitemap("sitemaps/test.xml"); $sitemap->setMaxUrls(5000); $sitemap->setBuffer(1000); foreach ($urls as $url) { $sitemap->addUrl($url); } $fileNames = $sitemap->finish(); -
To add images:
foreach ($items as $item) { $sitemap->addUrl($item->link, function($url) use($item){ $url->addImage($item->image, "Caption", "Title"); }); }
Dependency
It is a simple php package and hence it supports all php based frameworks like laravel, zend, symfony, falcon, lumen etc. The only dependency for this package is PHP.
Coming Soon
Support for video and news sitemap is on the way.
License
统计信息
- 总下载量: 691
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2018-01-01