anomaly/sitemap-extension
最新稳定版本:v2.4.0
Composer 安装命令:
composer require anomaly/sitemap-extension
包简介
A dynamic sitemap generator extension.
README 文档
README
anomaly.extension.sitemap
A dynamic sitemap generator extension.
The Sitemap Extension automatically generates XML sitemaps for your PyroCMS application with support for multiple addons and custom entries.
Features
- Automatic sitemap generation
- Multi-addon support
- Customizable priorities
- Change frequency configuration
- SEO optimization
- Dynamic content indexing
- Automatic URL discovery
Usage
Accessing Sitemap
The sitemap is automatically available at /sitemap.xml once the extension is installed.
Configuration
Navigate to Settings > Extensions > Sitemap in the control panel to configure:
- Enabled addons/modules
- URL priorities
- Change frequencies
- Additional URLs
Programmatic Access
use Anomaly\SitemapExtension\Sitemap\SitemapGenerator; $generator = app(SitemapGenerator::class); // Generate sitemap $sitemap = $generator->generate(); // Add custom URLs $generator->add('/custom-page', [ 'priority' => 0.8, 'changefreq' => 'weekly' ]);
In Twig
{# Link to sitemap #} <link rel="sitemap" type="application/xml" href="/sitemap.xml"> {# Generate sitemap link #} <a href="{{ url('sitemap.xml') }}">Sitemap</a>
Extending Sitemap
// In your service provider protected function boot() { $this->app['sitemap']->add('/my-custom-url', [ 'priority' => 0.7, 'changefreq' => 'monthly', 'lastmod' => now() ]); }
Requirements
- Streams Platform ^1.10
- PyroCMS 3.10+
- Spatie Laravel Sitemap ^7.3+
License
The Sitemap Extension is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 41.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-03-11