Initial import of sproutblog
This commit is contained in:
27
README.md
Normal file
27
README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# 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`
|
||||
|
||||
Reference in New Issue
Block a user