feat: restore sablog browse modes and clean imported HTML
Build and Deploy / verify (push) Successful in 40s
Build and Deploy / deploy (push) Successful in 36s

Keep the public site readable after import (nbsp, highlighter, wrapping code, compact pager) and finish the admin extras already in this tree: sticky levels, preview, page cache, and live llms.txt.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
gouki
2026-09-18 21:33:02 +00:00
co-authored by Cursor
parent 469160dc3f
commit ae47447062
98 changed files with 8618 additions and 901 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
if (! Schema::hasColumn('posts', 'sticky_level')) {
Schema::table('posts', function (Blueprint $table) {
$table->unsignedTinyInteger('sticky_level')->default(0)->after('is_sticky');
});
}
DB::table('posts')->where('is_sticky', true)->where('sticky_level', 0)->update(['sticky_level' => 1]);
}
public function down(): void
{
if (Schema::hasColumn('posts', 'sticky_level')) {
Schema::table('posts', function (Blueprint $table) {
$table->dropColumn('sticky_level');
});
}
}
};
+2
View File
@@ -392,6 +392,7 @@ CREATE TABLE `posts` (
`cover_media_id` bigint unsigned DEFAULT NULL,
`status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'published',
`is_sticky` tinyint(1) NOT NULL DEFAULT '0',
`sticky_level` tinyint unsigned NOT NULL DEFAULT '0',
`close_comment` tinyint(1) NOT NULL DEFAULT '0',
`read_password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`views` bigint unsigned NOT NULL DEFAULT '0',
@@ -580,3 +581,4 @@ INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (22,'2026_08_15_000
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (23,'2026_08_15_000004_add_custom_properties_to_media_library_table',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (24,'2026_09_16_000001_add_cover_media_id_to_posts_and_categories',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (25,'2026_09_16_000002_seed_default_media_folders',2);
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (26,'2026_09_18_210000_add_sticky_level_to_posts_table',3);
+1
View File
@@ -33,6 +33,7 @@ class DatabaseSeeder extends Seeder
'site_description' => config('blog.description'),
'site_icp' => config('blog.icp'),
'active_theme' => 'sablog',
'home_view_mode' => 'list',
'comment_audit' => '0',
'comment_min_len' => (string) config('blog.comment_min_len'),
'comment_max_len' => (string) config('blog.comment_max_len'),