Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(vercel): add tip for cleanUrls #430

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/pages/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ When you use `pnpm create valaxy` to create a template project, it contains the

::: zh-CN

对于已有的 Valaxy 博客,在开始部署之前,您需要先对您博客的 `vercel.json` 进行修改以便[启用 `cleanUrls` 支持](https://vercel.com/docs/projects/project-configuration#cleanurls):

```json
{
"cleanUrls": true
}
```

对于新创建的 Valaxy 博客,您只需要直接进行接下来的步骤即可。

- 在 Vercel 的 Dashboard 上,点击 `Add New...`,随后点击 `Project` 新建一个项目。
- 在左侧选择要部署的仓库,点击 `Import`,随后将 `Framework Preset` 设置为 `Other` 并更改 `Build and Output Settings`。
- 将 `Output Directory` 设置为 `dist` 后,点击 `Deploy`。
Expand Down
7 changes: 1 addition & 6 deletions packages/create-valaxy/template-blog/vercel.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"rewrites": [
{
"source": "/:path*",
"destination": "/:path*.html"
}
]
"cleanUrls": true
}
7 changes: 1 addition & 6 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"rewrites": [
{
"source": "/:path*",
"destination": "/:path*.html"
}
]
"cleanUrls": true
}
Loading