The project brings the sitemap generator based on the website crawler. It is made for Yii 1.1.x. Was not tested and not intended to work on 2.x It is related on PHP Simple HTML DOM Parser (http://simplehtmldom.sourceforge.net/)
Requirements ¶
Yii 1.1.x
Usage ¶
To use the generator simply add the SitemapCommand.php to your protected/components Copy the php-dom folder to protected/vendors (or download the newest version from the project website). Add configuration following in the protected/config/console.php:
'sitemap'=>array(
'class'=>'SitemapComponent',
'protocolPattern'=>'https',
'sitemapPath'=>'/var/www/mypage'
'excludeRegex'=>array(
//sample exclude the wp-* folders, if we also host w WordPress blog,
//and don't want to include this URLS to the sitemaps.
'/^(.*)wp-(.*)$/',
),
Then use in the console command:
Yii::app()->sitemap->generateSitemap();
The parameters are explained in the comments in the code. The sample configuration file and command is attached with the project.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.