Skip to content
This repository was archived by the owner on Nov 2, 2024. It is now read-only.

Commit 994a597

Browse files
committed
docs: follow upstream Shiro documation
1 parent 2acc72d commit 994a597

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

pages/themes/shiro.mdx

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ import { ToGitHub } from '@components/ToGitHub';
1919
- 你已注册 [Vercel](https://vercel.com/)[GitHub](https://github.com/) 账号
2020
- 你已注册 [Clerk](https://clerk.com/) 账号
2121

22+
<Callout type="warning">
23+
请注意,Shiro 主题的部署教程与初版有所不同,如果你已经部署过 Shiro 主题,请重新阅读本文档(尤其是填入配置文件环节,配置有所变化),并阅读最后一节[「移除 Edge Config」](#移除-edge-config)
24+
</Callout>
25+
2226
## 安装
2327

2428
import { Steps } from 'nextra/components'
@@ -82,11 +86,14 @@ import { EnvVariableConfig } from '@components/EnvVariableConfig';
8286

8387
<Video src="https://pan.vinua.cn/f/g3YfL/shiro_deploy.mp4" />
8488

85-
### 配置 Vercel Storage
89+
### 设置主题配置
8690

87-
<Video src="https://pan.vinua.cn/f/K9XIO/shiro_edge_config.mp4" />
91+
进入 Mix Space 后台,进入「配置与云函数」页面,点击右上角的新增按钮,在编辑页面中,填入以下设置:
8892

89-
进入 Vercel 项目仪表盘,在上方菜单栏找到 Storage,点击 Connect Storage 按钮,选择 Edge Config,填入配置:
93+
- 名称:`shiro`
94+
- 引用:`theme`
95+
- 数据类型:`JSON`
96+
- 数据:(点击下方的按钮复制)
9097

9198
<Callout>
9299
请注意,这份配置你需要自行修改成符合你的需求的配置。直接使用下面的配置可能会导致你的博客无法按照你的预期运行。
@@ -155,6 +162,10 @@ import { EnvVariableConfig } from '@components/EnvVariableConfig';
155162
"site": {
156163
"favicon": "/wibus.jpg"
157164
},
165+
"custom": {
166+
"scripts": null,
167+
"styles": null
168+
},
158169
"hero": {
159170
"title": {
160171
"template": [
@@ -206,19 +217,24 @@ import { EnvVariableConfig } from '@components/EnvVariableConfig';
206217
"bilibili": {
207218
"liveId": 1434499
208219
}
209-
}
220+
},
210221
}
211222
}
212223
```
213224

214-
点击 Save Item 按钮保存配置,然后回到仪表盘点击重新部署,等待部署完成。
225+
点击按钮保存配置,等待 Vercel 部署完成即可~ (不需要重新部署)
215226

216227
### 完成!
217228

218229
至此,你已完成了 Shiro 主题的部署,你可以访问你的博客了。有关配置域名的教程,请参考 [Vercel 文档](https://vercel.com/docs/custom-domains)
219230

220231
</Steps>
221232

233+
## 移除 Edge Config
234+
235+
在 Shiro 后续的更新中,你可能需要移除 Edge Config,以防止不必要的资源使用。
236+
237+
进入 Vercel 部署项目的仪表盘,点击上方的 Storage,进入 storage 设置页面,点击左侧的 Projects,将链接的项目取消链接,接着点击左侧的 Settings,点击右侧的 Delete Edge Config 按钮,即可完成删除。
222238

223239
<style global jsx>{`
224240
.nextra-cards img {

0 commit comments

Comments
 (0)