decor-6-site/site/config/config.php

68 lines
2.1 KiB
PHP
Raw Permalink Normal View History

2026-01-05 19:33:15 +01:00
<?php
/*
---------------------------------------
Kirby Configuration For Localhost
---------------------------------------
*/
return [
'debug' => true,
'languages' => false,
'smartypants' => [
'attr' => 1,
'doublequote.open' => '«&#8239;',
'doublequote.close' => '&#8239;»',
'doublequote.low' => '&#8222;',
'singlequote.open' => '&#8216;',
'singlequote.close' => '&#8217;',
'backtick.doublequote.open' => '&#8220;',
'backtick.doublequote.close' => '&#8221;',
'backtick.singlequote.open' => '&#8216;',
'backtick.singlequote.close' => '&#8217;',
'emdash' => '&#8212;',
'endash' => '&#8211;',
'ellipsis' => '&#8230;',
'space' => '(?: | |&#8239;|&#0*160;|&#x0*[aA]0;)',
'space.emdash' => ' ',
'space.endash' => ' ',
'space.colon' => '&#8239;',
'space.semicolon' => '&#8239;',
'space.marks' => '&#8239;',
'space.frenchquote' => '&#8239;',
'space.thousand' => '',
'space.unit' => ' ',
'guillemet.leftpointing' => '&#171;',
'guillemet.rightpointing' => '&#187;',
'geresh' => '&#1523;',
'gershayim' => '&#1524;',
'skip' => 'pre|code|kbd|script|style|math',
],
'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);
}
],
]
];