Files
plugi/extensions/plugi-ext-blog/config.php
T
deepDiverPaul 2d4b196b04 feat(ext-blog): Add rich Markdown editor for blog posts
Replace the plain textarea with a CodeMirror-based editor supporting syntax highlighting, formatting toolbar (bold, italic, lists, code blocks), and a live preview toggle. Update PostContentRenderer to handle new Markdown syntax (blockquotes, fenced code blocks). Add a preview endpoint for rendering content without saving.
2026-12-02 10:20:36 +00:00

51 lines
1.7 KiB
PHP

<?php
return [
'title' => 'Blog',
'author' => 'Paul Spenke',
'identifier' => 'blog',
'licence' => 'MIT',
'version' => '1.0.0',
'assets' => [
[
'src' => '/admin/assets/markdown-editor.css',
'type' => 'style',
'location' => 'admin-header',
],
[
'src' => '/admin/assets/markdown-editor.js',
'type' => 'script',
'location' => 'admin-header',
],
],
'tables' => [
'posts' => [
'columns' => [
'title' => 'varchar(255) NOT NULL',
'slug' => 'varchar(191) NOT NULL',
'excerpt' => 'text NOT NULL',
'body' => 'longtext NOT NULL',
'featured_image_id' => 'varchar(50) NULL',
'category_id' => 'int NULL',
'status' => "varchar(20) NOT NULL DEFAULT 'draft'",
'published_at' => 'datetime NULL',
'created_at' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
'updated_at' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
],
'uniqueKeys' => [
'slug' => ['slug'],
],
],
'categories' => [
'columns' => [
'name' => 'varchar(255) NOT NULL',
'slug' => 'varchar(191) NOT NULL',
'created_at' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
'updated_at' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP',
],
'uniqueKeys' => [
'slug' => ['slug'],
],
],
],
];