Warning Make sure you have the old and new blueprint available when running this command.
Otherwise this command will wipe the currently stored content.
Always make sure to test the command first and have a backup of your content!
<?php | |
use Kirby\Cache\FileCache; | |
use Kirby\Uuid\Identifiable; | |
use Kirby\Uuid\Uuid; | |
class UuidModels | |
{ | |
/** | |
* Create a new instance. |
fields: | |
articles: | |
type: pages | |
query: kirby.collection('articles') |
<?php | |
use Kirby\Cms\App; | |
use Kirby\Toolkit\A; | |
App::plugin('lukaskleinschmidt/snippet-assets', [ | |
'hooks' => [ | |
'page.render:after' => function (string $contentType, string $html) { | |
if ($contentType === 'html') { | |
$html = preg_replace_callback('/<\/head>/', fn ($matches) => |
<?php | |
use Kirby\Cms\App; | |
use Kirby\Toolkit\A; | |
App::plugin('lukaskleinschmidt/snippet-assets', [ | |
'hooks' => [ | |
'page.render:after' => function (string $contentType, string $html) { | |
if ($contentType === 'html') { | |
$html = preg_replace_callback('/<\/head>/', fn ($matches) => |
MIT License
Copyright (c) 2023 Lukas Kleinschmidt
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Inertia\Middleware; | |
class HandleInertiaRequests extends Middleware | |
{ |
<?php | |
use Kirby\Cms\App as Kirby; | |
use Kirby\Cms\Page; | |
use Kirby\Toolkit\A; | |
class DefaultPage extends Page | |
{ | |
// | |
} |
<?php | |
// bootstrap/kirby.php | |
include dirname(__DIR__) . '/vendor/autoload.php'; | |
$kirby = new Kirby([ | |
'roots' => [ | |
'base' => $base = dirname(__DIR__), | |
'index' => $base . '/public', | |
'content' => $base . '/content', |