Auto-generates a XML sitemap to find and catalogue pages of your site. The plugin maps pages correctly in single-language as well as in multi-language sites.
Enable the sitemap route for your Kirby instance by setting johannschopplich.helpers.sitemap.enabled
to true
. The generated sitemap will be available visiting example.com/sitemap.xml
. It will be cached if you have enabled Kirby's pages cache.
All templates (and thus pages) are included in the final sitemap by default. You can opt-out templates and pages – head over to the options to find out how.
You can disable templates on a blueprint-level as well. The sitemap
option defines a template's visibility in the sitemap. It yields to true
by default.
title: Article
options:
sitemap: false
Option | Default | Values | Description |
---|---|---|---|
johannschopplich.helpers.sitemap.enabled |
[] |
array | List of template names to include in the generated sitemap. |
johannschopplich.helpers.sitemap.exclude.templates |
[] |
array | List of template names to exclude from the generated sitemap. |
johannschopplich.helpers.sitemap.exclude.pages |
[] |
array | List of page ids to exclude. |
// config.php
return [
'johannschopplich.helpers.sitemap' => [
'enabled' => true,
'exclude' => [
'templates' => [
'archive',
'internal'
]
]
]
];
Forked from getkirby.com meta
plugin.
MIT License © 2020-PRESENT Johann Schopplich
MIT License © 2020-2022 Bastian Allgeier