Files
sproutblog/README.md
2026-04-14 13:17:55 +08:00

28 lines
513 B
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.
# SproutBlog
Cloudflare Worker + D1 的极简博客。
## 功能
- 公共博客页
- Markdown 渲染
- 简单后台 CRUD
- 手机和电脑自适应
## 初始化
1. 创建 D1 数据库:
`wrangler d1 create sproutblog`
2. 把生成的 `database_id` 填到 `wrangler.toml`
3. 应用迁移:
`wrangler d1 migrations apply sproutblog --remote`
4. 本地运行:
`npm run dev`
## 可选后台密码
如果要给 `/admin` 加密码,设置 `ADMIN_PASSWORD`
`wrangler secret put ADMIN_PASSWORD`