Updated README.md to document Markdown rendering and image authoring capabilities. Added PostContentRenderer class for safe Markdown parsing with XSS protection. Updated PostsRepository to fetch and resolve featured image data from the uploads table. Added UI controls in EditPost.php for selecting images and inserting inline Markdown. Updated views to display featured images on post cards and detail pages.
39 lines
1.4 KiB
PHP
39 lines
1.4 KiB
PHP
<?php
|
|
|
|
return [
|
|
'title' => 'Blog',
|
|
'author' => 'Paul Spenke',
|
|
'identifier' => 'blog',
|
|
'licence' => 'MIT',
|
|
'version' => '1.0.0',
|
|
'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'],
|
|
],
|
|
],
|
|
],
|
|
]; |