Migrate the Laysense production snapshot to LaySite 1.3

This commit is contained in:
2026-11-26 00:26:48 +08:00
parent 250a67af94
commit 89f363186b
80 changed files with 491 additions and 29 deletions
+1 -1
View File
@@ -233,7 +233,7 @@ final class SiteBackup
$tables['site_settings'] = [['id' => 1, 'payload' => Database::json($site)]];
foreach ($tables['sections'] as &$row) {
PageDraft::slug($row['key'] ?? null, ['home', 'contact', 'main-content', 'primary-navigation', 'preview']);
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout'], true)) {
if (!in_array($row['style'] ?? '', ['plain', 'tinted', 'hero-links', 'layout', 'about', 'projects', 'demos'], true)) {
throw new RuntimeException('备份包含未知区块样式。');
}
$row['body'] = Html::sanitize($row['body'] ?? '');