Files
larablog/README.md
T
gouki 3cec4c5e18
CI / PHPUnit (PHP 8.3) (push) Failing after 4s
CI / PHPUnit (PHP 8.2) (push) Failing after 1m9s
CI / Deploy (manual gate) (push) Skipped
wip: article AI polish, category SEO fields, cover generator, membership plan seeder
2026-09-07 18:48:37 +00:00

70 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LaraBlog
Laravel 12 + Filament 5 + Livewire + Spatie + Workerman 的现代博客平台,支持 sablog 内容迁移、主题/插件、S3 兼容附件、HTML/Markdown 双轨、AI 队列与 `/api/v1` 只读接口。
## 快速开始
完整说明:[docs/ops/install.md](docs/ops/install.md)。迁旧站不要 `db:seed`,改走 [docs/ops/import.md](docs/ops/import.md)。
```bash
composer install
cp .env.example .env
php artisan key:generate
# 配置 DB_*;开发可设 ATTACHMENTS_DRIVER=local,生产配 AWS_* / MinIO
php artisan migrate
php artisan db:seed
php artisan plugins:sync --enable=larablog/ai-comment-moderation
php artisan themes:publish
php artisan serve
```
- 前台:`/``/show-{id}.shtml``/login.shtml`
- 后台:`/admin``admin@larablog.test` / `password`
- API`/api/v1/*`OpenAPI`/docs/api/openapi.yaml`
## 文档索引
| 文档 | 内容 |
|---|---|
| [docs/ops/install.md](docs/ops/install.md) | 本地安装、演示账号、插件 |
| [docs/ops/import.md](docs/ops/import.md) | sablog 导入(ID / 附件 / 旧密码) |
| [docs/ops/deploy.md](docs/ops/deploy.md) | 生产部署:nginx、PM2、Redis、S3 |
| [docs/architecture.md](docs/architecture.md) | 架构、分层、开发思想 |
| [docs/themes.md](docs/themes.md) | 皮肤目录格式与开发 |
| [docs/plugins.md](docs/plugins.md) | 插件格式 / Hook |
| [docs/routing.md](docs/routing.md) | `.shtml` 路由策略 |
| [docs/api/](docs/api/) | OpenAPI + 小程序向只读 API |
| [docs/specs/larablog-platform/](docs/specs/larablog-platform/) | SPEC / CHECKLIST / TESTPLAN |
## 进程与 CI
- PM2`ecosystem.config.cjs`queue / schedule / workerman
- GitHub Actions`.github/workflows/ci.yml`PHP 8.2/8.3 + PHPUnit
## 测试
```bash
php artisan test
```
- 默认 **sqlite `:memory:`**(见 `phpunit.xml`
- 覆盖:legacy URL、导入 fixture、auth、附件、AI stub、API v1 等
- **不是**全站手工 E2E;支付/会员真实链路等属二期
## Redis 前缀
```env
REDIS_PREFIX=larablog_
CACHE_PREFIX=larablog_cache_
```
## sablog 导入
完整步骤、编码、附件补传与导入后开后台:[docs/ops/import.md](docs/ops/import.md)。
```bash
php artisan sablog:import --mode=raw --dry-run
php artisan sablog:import --mode=raw --attachments=/path/to/attachments
php artisan sablog:import --mode=markdown --attachments=/path/to/attachments
```