Skip to content

Commit 1545716

Browse files
authored
docs(vercel): add tip for cleanUrls (#430)
1 parent d3844da commit 1545716

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

docs/pages/guide/deploy.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ When you use `pnpm create valaxy` to create a template project, it contains the
9191

9292
::: zh-CN
9393

94+
对于已有的 Valaxy 博客,在开始部署之前,您需要先对您博客的 `vercel.json` 进行修改以便[启用 `cleanUrls` 支持](https://vercel.com/docs/projects/project-configuration#cleanurls)
95+
96+
```json
97+
{
98+
"cleanUrls": true
99+
}
100+
```
101+
102+
对于新创建的 Valaxy 博客,您只需要直接进行接下来的步骤即可。
103+
94104
- 在 Vercel 的 Dashboard 上,点击 `Add New...`,随后点击 `Project` 新建一个项目。
95105
- 在左侧选择要部署的仓库,点击 `Import`,随后将 `Framework Preset` 设置为 `Other` 并更改 `Build and Output Settings`
96106
-`Output Directory` 设置为 `dist` 后,点击 `Deploy`
Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"rewrites": [
3-
{
4-
"source": "/:path*",
5-
"destination": "/:path*.html"
6-
}
7-
]
2+
"cleanUrls": true
83
}

vercel.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
11
{
2-
"rewrites": [
3-
{
4-
"source": "/:path*",
5-
"destination": "/:path*.html"
6-
}
7-
]
2+
"cleanUrls": true
83
}

0 commit comments

Comments
 (0)