✨ Rewrite for Kirby
This commit is contained in:
parent
07201d05de
commit
f854d60108
116 changed files with 4156 additions and 8875 deletions
37
site/config/config.php
Normal file
37
site/config/config.php
Normal file
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'analytics' => [
|
||||
'goatcounter' => 'stats.mmk2410.org'
|
||||
],
|
||||
'routes' => [
|
||||
[
|
||||
'pattern' => 'feed',
|
||||
'action' => fn () => go('/blog.rss')
|
||||
],
|
||||
[
|
||||
'pattern' => 'index.xml',
|
||||
'action' => fn () => go('/blog.rss')
|
||||
],
|
||||
[
|
||||
'pattern' => '(:num)/(:num)/(:num)/(:any)',
|
||||
'action' => function ($year, $month, $day, $slug) {
|
||||
$page = page('blog/' . $slug);
|
||||
if (!$page) return site()->errorPage();
|
||||
return site()->visit($page);
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'blog/category/(:any)',
|
||||
'action' => function($category) {
|
||||
return page('blog')->render(['category' => $category]);
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'blog/tag/(:any)',
|
||||
'action' => function($tag) {
|
||||
return page('blog')->render(['tag' => $tag]);
|
||||
}
|
||||
]
|
||||
]
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue