mirror of
https://github.com/Huber1/skigemeinschaft.git
synced 2026-05-13 12:27:34 +02:00
61 lines
2.4 KiB
PHP
61 lines
2.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* The config file is optional. It accepts a return array with config options
|
|
* Note: Never include more than one return statement, all options go within this single return array
|
|
* In this example, we set debugging to true, so that errors are displayed onscreen.
|
|
* This setting must be set to false in production.
|
|
* All config options: https://getkirby.com/docs/reference/system/options
|
|
*/
|
|
return [
|
|
'debug' => false,
|
|
'yaml.handler' => 'symfony', // already makes use of the more modern Symfony YAML parser: https://getkirby.com/docs/reference/system/options/yaml (will become the default in a future Kirby version)
|
|
'routes' => [
|
|
[
|
|
'pattern' => 'sitemap.xml',
|
|
'action' => function () {
|
|
$pages = site()->pages()->index();
|
|
|
|
// fetch the pages to ignore from the config settings,
|
|
// if nothing is set, we ignore the error page
|
|
$ignore = kirby()->option('sitemap.ignore', ['error']);
|
|
|
|
$content = snippet('sitemap', compact('pages', 'ignore'), true);
|
|
|
|
// return response with correct header type
|
|
return new Kirby\Cms\Response($content, 'application/xml');
|
|
},
|
|
],
|
|
[
|
|
'pattern' => 'sitemap',
|
|
'action' => function () {
|
|
return go('sitemap.xml', 301);
|
|
},
|
|
],
|
|
],
|
|
'thumbs' => [
|
|
'srcsets' => [
|
|
'default' => [
|
|
'300w' => ['width' => 300],
|
|
'600w' => ['width' => 600],
|
|
'900w' => ['width' => 900],
|
|
'1200w' => ['width' => 1200],
|
|
'1800w' => ['width' => 1800],
|
|
],
|
|
'avif' => [
|
|
'300w' => ['width' => 300, 'format' => 'avif'],
|
|
'600w' => ['width' => 600, 'format' => 'avif'],
|
|
'900w' => ['width' => 900, 'format' => 'avif'],
|
|
'1200w' => ['width' => 1200, 'format' => 'avif'],
|
|
'1800w' => ['width' => 1800, 'format' => 'avif'],
|
|
],
|
|
'webp' => [
|
|
'300w' => ['width' => 300, 'format' => 'webp'],
|
|
'600w' => ['width' => 600, 'format' => 'webp'],
|
|
'900w' => ['width' => 900, 'format' => 'webp'],
|
|
'1200w' => ['width' => 1200, 'format' => 'webp'],
|
|
'1800w' => ['width' => 1800, 'format' => 'webp'],
|
|
],
|
|
],
|
|
],
|
|
];
|