完成目录架构变更
This commit is contained in:
49
content/docs/1.简单文档/4.deployment.md
Normal file
49
content/docs/1.简单文档/4.deployment.md
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
title: 部署服务
|
||||
description: 部署你的 Estel Docs 应用。
|
||||
navigation:
|
||||
icon: lucide:cloud
|
||||
---
|
||||
|
||||
## 静态托管
|
||||
|
||||
::steps{:level="4"}
|
||||
#### 在 `nuxt.config.ts` 或 `.env` 中配置 `site.url`
|
||||
|
||||
OG Images 必须使用绝对 URL 提供服务,您需要提供一个站点 URL。
|
||||
|
||||
::code-group
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
site: {
|
||||
url: 'https://example.com',
|
||||
},
|
||||
});
|
||||
```
|
||||
```dotenv [.env]
|
||||
NUXT_SITE_URL=https://example.com
|
||||
```
|
||||
::
|
||||
|
||||
#### 运行生成命令
|
||||
:pm-run{script="generate"}
|
||||
|
||||
::alert{icon="lucide:triangle"}
|
||||
在 Vercel 上,在**构建和开发设置**中将**构建命令**设置为 `nuxt generate`。
|
||||
::
|
||||
|
||||
#### 部署
|
||||
您现在可以将 `.output/public` 目录部署到任何静态托管服务,或使用 `npx serve .output/public` 在本地预览。
|
||||
::
|
||||
|
||||
## SSR 服务器
|
||||
|
||||
::steps{:level="4"}
|
||||
#### 运行构建命令
|
||||
:pm-run{script="build"}
|
||||
|
||||
#### 部署
|
||||
```shell
|
||||
node .output/server/index.mjs
|
||||
```
|
||||
::
|
Reference in New Issue
Block a user