Skip to content
This repository was archived by the owner on May 24, 2020. It is now read-only.

thathoff/kirby-sitemap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kirby sitemap.xml Plugin

This plugin generates a sitemap.xml from all pages in Kirby. It's possible to exclude pages from the sitemap and to assign which pages should have the highest priority (1). The priority can be disabled for all pages otherwise pages are prioritized automaticaly by depth.

Installation

Composer

composer require blankogmbh/kirby-sitemap

Kirby CLI

kirby plugin:install blankogmbh/kirby-sitemap

Git

Check out this repository to to /site/plugins/ or include it as a submodule git submodule add https://github.com/blankogmbh/kirby-sitemap.git site/plugins/kirby-sitemap.

Usage

You can preview your sitemap by browsing to http://your-fancy-kirby-site.net/sitemap.xml.

The plugin can be configured via Kirby’s config.php.

Exclude Pages From the Sitemap

c::set('sitemap.exclude', [
    'error', // just the page error
    'example*', // exclude all pages starting with example
    'example/*', // exclude only subpages of example (but include example)
]);

Exclude hidden Pages

c::set('sitemap.excludeHiddenPages', true);

Include hidden pages on root level

If you set sitemap.excludeHiddenPages to true, but want the hidden root pages to be included

c::set('sitemap.includeHiddenRootPages', true);

Prioritize Pages

c::set('sitemap.priority', [
    'contact', // just the page contact
    'important*', // all pages starting with important
    'important/*', // all subpages of important (but not important)
]);

c::set('sitemap.priority', false); // disable prioritization
c::set('sitemap.pingGoogle', true);

Change route pattern

c::set('sitemap.route.pattern', 'sitemap-xml');

Author

Markus Denhoff / Blanko denhoff@blanko.de

Inspired by Thomas Ghysels sitemap plugin.

About

Kirby plugin for creating a sitemap.xml

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages