Files
deepDiverPaul 6f0e39b5f5 feat(ext-blog): Add syntax highlighting for code blocks
Added language-specific syntax highlighting support to the markdown editor and preview. New code-highlighter assets are registered for public pages and admin headers. The PostContentRenderer detects language identifiers in code fences to apply appropriate CSS classes for highlighting. Tests verify the highlighting works correctly and unsafe content is escaped properly.
2026-12-02 10:20:36 +00:00

71 lines
2.2 KiB
PHP

<?php
return [
'title' => 'Blog',
'author' => 'Paul Spenke',
'identifier' => 'blog',
'licence' => 'MIT',
'version' => '1.0.0',
'assets' => [
[
'src' => '/assets/code-highlighter.css',
'type' => 'style',
'location' => 'footer',
],
[
'src' => '/assets/code-highlighter.js',
'type' => 'script',
'location' => 'footer',
],
[
'src' => '/assets/code-highlighter.css',
'type' => 'style',
'location' => 'admin-header',
],
[
'src' => '/assets/code-highlighter.js',
'type' => 'script',
'location' => 'admin-header',
],
[
'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'],
],
],
],
];