Download the PHP package vdlp/oc-sitemap-plugin without Composer
On this page you can find all versions of the php package vdlp/oc-sitemap-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vdlp/oc-sitemap-plugin
More information about vdlp/oc-sitemap-plugin
Files in vdlp/oc-sitemap-plugin
Package oc-sitemap-plugin
Short Description A sitemap.xml generator for October CMS.
License GPL-2.0-only
Informations about the package oc-sitemap-plugin
Vdlp.Sitemap
This plugin allows developers to create a sitemap.xml using a sitemap definition generator.
Requirements
- PHP 8.0.2 or higher
- Supports October CMS 3.x only
Usage
Sitemap definitions generator
To generate sitemap items you can create your own sitemap definition generator.
Example:
Register your generator in the boot
method of your plugin class:
You can also register multiple generators:
Invalidate sitemap cache
You can fire an event to invalidate the sitemap cache
Or resolve the generator instance and use the invalidate cache method
Update / Add / Delete definitions in cache
First resolve the sitemap generator
Add definitions
Update definitions
Note, definitions are updated by their URL.
Update or add definitions
Delete definitions
Exclude URLs from sitemap
Configuration
Add the plugin configuration to your config folder:
You can change the amount of seconds the sitemap is cached in your .env
file.
You can also cache the sitemap forever.
ConfigResolver
Optionally you can override how the sitemap config should be resolved by giving your own ConfigResolver implementation in the config file. This can be useful for multisite projects, where the sitemap should be cached per domain.
Issues
If you have issues using this plugin. Please create an issue on GitHub or contact us at [[email protected]]().
Contribution
Any help is appreciated. Or feel free to create a Pull Request on GitHub.