design article title and add author virtual page

This commit is contained in:
isUnknown 2024-03-09 16:34:09 +01:00
parent 6fe73efbcf
commit 2114fbbb8e
12 changed files with 129 additions and 25 deletions

View file

@ -1,5 +1,7 @@
<?php
use Kirby\Uuid\Uuid;
return [
'debug' => true,
'panel' => [
@ -44,5 +46,25 @@ return [
'comments',
'system'
]
]
],
'routes' => [
[
'pattern' => 'auteur/(:any)',
'action' => function ($slug) {
$kirby = kirby();
$author = getAuthorBySlug($slug);
return Page::factory([
'slug' => '',
'template' => 'author',
'model' => 'authors',
'content' => [
'title' => $author->name(),
'presentation' => $author->presentation(),
'uuid' => Uuid::generate(),
]
]);
}
]
]
];