@@ -31,34 +31,22 @@ import { ToGitHub } from '@components/ToGitHub'
31
31
## 前提要求
32
32
33
33
- 你已安装 Mix Space 后端并且已启动
34
- - 你已注册 [ Vercel] ( https://vercel.com/ ) 和 [ GitHub] ( https://github.com/ ) 账号
35
34
- 你已注册 [ Clerk] ( https://clerk.com/ ) 账号
35
+ - (选择 Vercel 部署)已注册 [ Vercel] ( https://vercel.com/ ) 和 [ GitHub] ( https://github.com/ ) 账号
36
36
37
37
<Callout type = " warning" >
38
38
请注意,Shiro 主题的部署教程与初版有所不同,如果你已经部署过 Shiro
39
- 主题,请重新阅读本文档(尤其是填入配置文件环节,配置有所变化),并阅读最后一节
40
- [ 「移除 Edge Config」] ( #移除-edge-config ) 。
39
+ 主题,请重新阅读本文档(尤其是填入配置文件环节,配置有所变化),并阅读
40
+ [ 「移除 Edge Config」] ( #移除-edge-config ) 部分 。
41
41
</Callout >
42
42
43
- ## 安装
43
+ ## 准备步骤
44
44
45
45
import { Steps } from ' nextra/components'
46
46
import Video from ' @components/Video'
47
47
48
48
<Steps >
49
49
50
- ### 克隆仓库
51
-
52
- 登陆 GitHub 账号,打开 [ Innei/Shiro] ( https://github.com/Innei/Shiro ) ,点击右上角的 Fork 按钮,将仓库克隆到你的账号下。
53
-
54
- <Video src = " https://pan.vinua.cn/f/73dt6/fork_shiro.mp4" />
55
-
56
- ### 打开 Vercel 创建项目
57
-
58
- 登陆 Vercel 账号,点击右上角的 New Project 按钮,选择 Import Git Repository,选择你刚刚 Fork 的仓库,点击 Import 按钮,即可进入到项目配置页面。
59
-
60
- <Video src = " https://pan.vinua.cn/f/52ocj/shiro_create_new_project.mp4" />
61
-
62
50
### 打开 Clerk 创建项目
63
51
64
52
打开 [ Clerk 仪表盘] ( https://dashboard.clerk.com/ ) 点击 Add application 按钮,填入你的博客名称,并配置信息,点击 Create application 按钮,即可完成配置。
@@ -287,13 +275,39 @@ import { EnvVariableConfig } from '@components/EnvVariableConfig'
287
275
]}
288
276
/>
289
277
278
+ </Steps >
279
+
280
+ ## 通过 Vercel 部署
281
+
282
+ <Steps >
283
+
284
+ ### 克隆仓库
285
+
286
+ 登陆 GitHub 账号,打开 [ Innei/Shiro] ( https://github.com/Innei/Shiro ) ,点击右上角的 Fork 按钮,将仓库克隆到你的账号下。
287
+
288
+ <Video src = " https://pan.vinua.cn/f/73dt6/fork_shiro.mp4" />
289
+
290
+ ### 打开 Vercel 创建项目
291
+
292
+ 登陆 Vercel 账号,点击右上角的 New Project 按钮,选择 Import Git Repository,选择你刚刚 Fork 的仓库,点击 Import 按钮,即可进入到项目配置页面。
293
+
294
+ <Video src = " https://pan.vinua.cn/f/52ocj/shiro_create_new_project.mp4" />
295
+
290
296
### 键入环境变量 & 开始部署
291
297
292
298
在刚刚进入的 Vercel 项目配置页面中,点击 Environment Variables,然后键盘上的 Ctrl + V 将环境变量粘贴到输入框中,然后点击 Deploy 按钮,等待部署完成。
293
299
300
+ 有关配置自定义域名的教程,请参考 [ Vercel 文档] ( https://vercel.com/docs/custom-domains ) 。
301
+
294
302
<Video src = " https://pan.vinua.cn/f/g3YfL/shiro_deploy.mp4" />
295
303
296
- ### Clerk 登录与 Mix Space 后端绑定
304
+ </Steps >
305
+
306
+ ## 通过预构建运行 & Docker Compose
307
+
308
+ 参见 [ README 相关部分] ( https://github.com/Innei/Shiro/blob/main/README.md#whale-运行 ) 完成对应操作,随后配置[ 反向代理] ( /docs/extra#反向代理 ) 。
309
+
310
+ ## Clerk 登录与 Mix Space 后端绑定
297
311
298
312
如果你遇到在 Shiro 登录之后,无法评论遇到 "和主人重名" 的报错,是因为 Clerk 的用户名和 Mix Space 后端的用户名重复了,你需要绑定本系统和 Clerk 的用户。让某个 Clerk 用户具有管理员权限。
299
313
@@ -319,11 +333,9 @@ Key:
319
333
320
334
Refer: https://github.com/Innei/Shiro/issues/137
321
335
322
- ### 完成!
323
-
324
- 至此,你已完成了 Shiro 主题的部署,你可以访问你的博客了。有关配置域名的教程,请参考 [ Vercel 文档] ( https://vercel.com/docs/custom-domains ) 。
336
+ ## 完成!
325
337
326
- </ Steps >
338
+ 至此,你已完成了 Shiro 主题的部署,你可以访问你的博客了。
327
339
328
340
## 移除 Edge Config
329
341
@@ -333,10 +345,18 @@ Refer: https://github.com/Innei/Shiro/issues/137
333
345
334
346
## 更新
335
347
336
- 按照文档的部署方法使用 Vercel 托管的话,只需要在自己 Fork 的项目上 Sync Fork 即可(如图)。如果自己有魔改某些内容的话不要点击 Discard Changes,会把自己的魔改搞没了。
348
+ ### Vercel 托管
349
+
350
+ 使用 Vercel 托管的话,只需要在自己 Fork 的项目上 Sync Fork 即可(如图)。如果自己有魔改某些内容的话不要点击 Discard Changes,会把自己的魔改搞没了。
337
351
338
352
![ ] ( https://pan.vinua.cn/f/GRefM/0.png )
339
353
354
+ ### 通过预构建运行 & Docker Compose
355
+
356
+ 预构建:重复对应步骤。
357
+
358
+ Docker Compose:` docker compose pull && docker compose up -d `
359
+
340
360
<style global jsx >{ `
341
361
.nextra-cards img {
342
362
border-radius: 50%;
0 commit comments