docs: 开发规范/教程/demo 全套 + 修复插件运行期自动加载缺口

- demo 插件 plugins/demo.hello-world:演示短代码过滤器、comment.created 钩子、路由+命名空间视图、迁移+模型、后台设置页、filament.post_form 表单注入
- demo 主题 themes/demo:最小可运行主题(覆盖 partials + 绿色系样式)
- 教程 docs/tutorial-plugin.md / docs/tutorial-theme.md(10 分钟上手);规范 docs/development.md(代码/插件/主题/队列/测试/提交)
- README 增加开发者文档导航与上手示例
- 修复关键缺口:插件类原来靠 composer.json 硬编码加载,第三方 ZIP 安装的插件无法加载;现改为启动时扫描 plugins/*/src 运行期注册 PSR-4(register 阶段,保证 Filament 面板解析插件页面前就绪),composer.json 移除硬编码
- 测试:demo 插件 3 个用例 + demo 主题渲染;全量 89 通过
This commit is contained in:
ak
2026-08-12 17:26:34 +08:00
parent 7364def979
commit 8fdf8dbb4b
21 changed files with 840 additions and 11 deletions
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Hello World 演示 - {{ blog_setting('site_name', config('blog.name')) }}</title>
<link rel="stylesheet" href="{{ theme('asset', 'style.css') }}">
</head>
<body>
@include('partials.header')
<div class="container main-layout">
<main class="content">
<article class="post-full">
<h1 class="post-title">Hello World 演示页</h1>
<p>这个页面由插件路由渲染,视图来自插件目录 <code>views/hello.blade.php</code>(命名空间 <code>demo-hello::</code>)。</p>
<p>在文章正文里写 <code>[hello 世界]</code>,渲染时会变成:<span class="hello-world">你好,世界!</span></p>
<p>最近捕获的评论(<code>hello_world_logs</code> 表):</p>
<ul>
@forelse($logs as $log)
<li>#{{ $log->comment_id }}{{ $log->note }}</li>
@empty
<li>暂无记录,去发一条评论试试</li>
@endforelse
</ul>
</article>
</main>
@include('partials.sidebar')
</div>
@include('partials.footer')
</body>
</html>