mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
ce3e99d196
* docs: document live preview site settings * docs: refine live preview translations and metadata * docs: document live preview agent panel * docs: refine live preview copy * 💅 * localize --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
62 lines
2.6 KiB
Plaintext
62 lines
2.6 KiB
Plaintext
---
|
||
title: "实时预览"
|
||
description: "在编辑时实时预览你的文档站点,持续查看内容、导航和站点配置的更改;了解如何在编辑器或新标签页中打开实时预览,并使用 Site settings 检查器调整配置、查看渲染结果、比较预览部署,以及在发布前检查更改。适合在编辑过程中获得即时反馈,帮助你在共享预览前验证页面显示效果和站点设置是否符合预期。"
|
||
keywords: ["editor", "preview", "live preview"]
|
||
---
|
||
|
||
在编辑时预览你的站点。实时预览会准确呈现页面发布后的效果,并在你对内容、导航和配置进行修改时实时更新。
|
||
|
||
<div id="open-live-preview">
|
||
## 打开实时预览
|
||
</div>
|
||
|
||
点击顶部栏中的 <Icon icon="play" /> 实时预览按钮。
|
||
|
||
<Frame>
|
||
<img
|
||
src="/images/editor/live-preview-light.png"
|
||
alt="工具栏中的实时预览按钮。"
|
||
className="block dark:hidden"
|
||
/>
|
||
<img
|
||
src="/images/editor/live-preview-dark.png"
|
||
alt="工具栏中的实时预览按钮。"
|
||
className="hidden dark:block"
|
||
/>
|
||
</Frame>
|
||
|
||
<div id="edit-site-settings-in-live-preview">
|
||
## 在实时预览中编辑站点设置
|
||
</div>
|
||
|
||
在实时预览中编辑站点设置,查看这些设置如何影响渲染后的内容。
|
||
|
||
1. 在编辑器中打开实时预览。
|
||
2. 点击预览工具栏中的 **Site settings**。
|
||
3. 选择配置分区并编辑设置。
|
||
|
||
如果你将实时预览设置为在新标签页中打开,站点设置菜单将不可用。请在[编辑器设置](/zh/editor/settings)中关闭 **Open live preview in new tab**,以使用站点设置菜单。
|
||
|
||
<div id="ask-the-agent-in-live-preview">
|
||
## 在实时预览中向代理提问
|
||
</div>
|
||
|
||
点击预览工具栏中的 **Ask agent**,在实时预览旁打开[编辑器代理](/zh/editor/agent)。只有编辑者和管理员可以在实时预览中使用代理。
|
||
|
||
<Note>
|
||
实时预览适用于公开站点和受 Mintlify 身份验证保护的站点。对于需要身份验证的站点,编辑器会自动在预览中完成登录。
|
||
</Note>
|
||
|
||
<div id="live-preview-versus-preview-deployments">
|
||
## 实时预览与预览部署
|
||
</div>
|
||
|
||
| | 实时预览 | 预览部署 |
|
||
|---|---|---|
|
||
| **速度** | 即时 | 需要构建 |
|
||
| **访问方式** | 本地 URL,受保护站点会自动完成身份验证 | 可分享的 URL |
|
||
| **使用时机** | 在编辑时查看更改 | 与团队共享以供审阅 |
|
||
| **可用性** | 当编辑器打开时 | 只要该 branch 存在 |
|
||
|
||
在编辑过程中使用实时预览以获得即时反馈。当你需要与团队共享更改,或在不同设备上测试时,请使用 [预览部署](/zh/editor/branching-and-publishing#preview-your-changes)。
|