Skip to content

marvinsiefke/kirby-crawlers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kirby-crawlers

kirby-crawlers is a very lightweight Kirby plugin (tested with Kirby 4) for providing sitemap.xml, sitemap.txt and robots.txt. The plugin also notifies Bing via IndexNow if an api key is given.

Demo

You can see some exemplary results here:

Configuration

It is recommended to define a sitemap collection like this in site/collections/sitemap.php:

return function ($site) {
  return $site->pages()->index()->filterBy('noindex', '!=', 'enabled');
};

You can read more in Kirby’s documentation: https://getkirby.com/docs/guide/templates/collections.

Otherwise the plugin uses a fallback:

site()->pages()->index();

You can also set up custom rules for the robots.txt and define the IndexNow key in your config.php:

'pepper.crawlers' => [
	'robots' => [
		'disallow' => ['/panel/', '/backend/'],
		'allow' => ['/', '/public/'],
		'custom' => ['Crawl-delay: 10']
	],
	'indexnow' => [
		'key' => '9e7e357659434acf91e78430729ecad7',
		// 'api' => 'https://www.bing.com/indexnow'
	]
],

You can generate your api key here: https://www.bing.com/indexnow/getstarted#implementation

About

Kirby plugin for providing sitemap.xml, sitemap.txt and robots.txt. Also notifies Bing via IndexNow.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages