## Corriger l'erreur manuellement
@@ -24,11 +35,13 @@ Tant qu'une page contient un MDX non valide ou un frontmatter YAML non valide, c
2. Basculez en mode source avec
Cmd +
Shift +
S (macOS) ou
Ctrl +
Shift +
S (Windows). Le mode source met en évidence le MDX non valide et affiche l'erreur de parsing.
3. Corrigez la syntaxe. Une fois la page parsée, l'erreur disparaît et le bouton **Publish** redevient disponible.
+Pour les erreurs de frontmatter, vérifiez que chaque valeur est du YAML valide : mettez entre guillemets les chaînes contenant des deux-points ou des caractères spéciaux, gardez une indentation cohérente et fermez toutes les guillemets. Consultez [Métadonnées de page](/fr/organize/pages#page-metadata) pour connaître les champs de frontmatter pris en charge.
+
-### Corriger l'erreur avec l'agent
+## Corriger l'erreur avec l'agent
1. Ouvrez le panneau de l'éditeur.
-2. Demandez à l'agent de corriger tout MDX ou frontmatter YAML non valide.
+2. Demandez à l'agent de corriger tout MDX ou frontmatter YAML non valide. Sans mention, l'agent utilise la page que vous avez ouverte comme contexte initial. Pour corriger des erreurs sur l'ensemble de la branch en une seule requête, demandez à l'agent de trouver et de réparer toutes les pages avec du MDX non valide. Consultez [Agent](/fr/editor/agent).
diff --git a/help-center/publish-button-disabled-invalid-mdx.mdx b/help-center/publish-button-disabled-invalid-mdx.mdx
index c55310cbf..10bc2913f 100644
--- a/help-center/publish-button-disabled-invalid-mdx.mdx
+++ b/help-center/publish-button-disabled-invalid-mdx.mdx
@@ -14,13 +14,22 @@ The tooltip tells you how many pages have errors. The same error blocks **Reques
While a page has invalid MDX or invalid frontmatter YAML, those edits stay local to you. Teammates editing the same page only receive valid content, so a syntax error you introduce doesn't overwrite their work. See [Collaborate in the editor](/editor/collaborate) for how real-time editing handles invalid content.
+## Find the affected page
+
+If the tooltip reports one broken page, it's usually the page you're editing. If it reports more than one, or you don't know which page has the error, check each page you've changed on the branch:
+
+1. Click **Publish** in the toolbar to open the publish menu. The menu lists every changed file on your branch.
+2. Open each changed file in turn and look for parsing errors in source mode (see below). Pages that parse successfully render normally; the broken page shows the error.
+
## Fix the error manually
1. Open the affected page in the editor.
2. Switch to source mode with
Cmd +
Shift +
S (macOS) or
Ctrl +
Shift +
S (Windows). Source mode highlights the invalid MDX and shows the parsing error.
3. Fix the syntax. Once the page parses, the error clears and the **Publish** button becomes available again.
+For frontmatter errors, check that every value is valid YAML: quote strings that contain colons or special characters, keep indentation consistent, and close every quote. See [Page metadata](/organize/pages#page-metadata) for the supported frontmatter fields.
+
## Fix the error with the agent
1. Open the editor panel.
-2. Prompt the agent to fix any invalid MDX or frontmatter YAML.
+2. Prompt the agent to fix any invalid MDX or frontmatter YAML. Without a mention, the agent uses the page you have open as its initial context. To fix errors across the branch in one prompt, ask the agent to find and repair every page with invalid MDX. See [Agent](/editor/agent).
diff --git a/zh/editor/tutorial.mdx b/zh/editor/tutorial.mdx
index 2da6affa5..89438988b 100644
--- a/zh/editor/tutorial.mdx
+++ b/zh/editor/tutorial.mdx
@@ -6,6 +6,13 @@ keywords: ["editor", "tutorial", "branch", "publish"]
本教程将引导你使用编辑器完成一次完整的内容更新。你将创建分支、进行更改、分享预览以供审阅,然后发布你的更改。
+
+ **前置条件**
+
+ - 可以访问 [app.mintlify.com](https://app.mintlify.com) 上的编辑器。参见[Web 编辑器](/zh/editor)了解界面导览。
+ - 具备**管理员**或**编辑者**角色。访问者可以在分支上编辑并留下[评论和建议](/zh/editor/collaborate),但不能发布或请求审阅。参见[角色](/zh/dashboard/roles)。
+
+
分支是你内容的临时副本。你可以在其中进行更改,而不会影响你的线上站点。你可以把分支合并到线上站点,也可以在决定不进行更改时安全地丢弃它。
@@ -21,6 +28,8 @@ keywords: ["editor", "tutorial", "branch", "publish"]
1. 点击 **New branch**。
编辑器会切换到你的新分支。你所做的任何更改都只在该分支上,并在你工作时自动提交到该分支。只有在你完成发布流程后,它们才会出现在你的线上站点上。
+
+ 如果想丢弃分支而不是发布它,在分支菜单中将鼠标悬停在分支上并点击 **Delete branch**。参见[删除分支](/zh/guides/branches#delete-a-branch)。
编辑现有页面或创建新页面。
diff --git a/zh/help-center/publish-button-disabled-invalid-mdx.mdx b/zh/help-center/publish-button-disabled-invalid-mdx.mdx
index 14e27aa70..aa34ae65f 100644
--- a/zh/help-center/publish-button-disabled-invalid-mdx.mdx
+++ b/zh/help-center/publish-button-disabled-invalid-mdx.mdx
@@ -14,6 +14,17 @@ keywords: ["publish disabled", "fix invalid MDX before publishing", "invalid MDX
当某个页面存在无效的 MDX 或无效的 frontmatter YAML 时,那些编辑仅保留在你本地。协作编辑同一页面的同事只会收到有效内容,因此你引入的语法错误不会覆盖他们的工作。有关实时编辑如何处理无效内容的说明,请参阅[在编辑器中协作](/zh/editor/collaborate)。
+
+
+## 查找受影响的页面
+
+
+
+如果提示只显示一个损坏的页面,通常就是你当前正在编辑的那一个。如果显示多个,或者你不确定是哪个页面有错误,请检查你在分支上更改过的每个页面:
+
+1. 点击工具栏中的 **Publish** 打开发布菜单。菜单会列出你分支上所有已更改的文件。
+2. 依次打开每个已更改的文件,并在 source 模式下查找解析错误(见下文)。能够正常解析的页面会正常显示;出错的页面会显示错误。
+
## 手动修复错误
@@ -24,11 +35,13 @@ keywords: ["publish disabled", "fix invalid MDX before publishing", "invalid MDX
2. 使用
Cmd +
Shift +
S(macOS)或
Ctrl +
Shift +
S(Windows)切换到 source 模式。source 模式会高亮显示无效的 MDX 并展示解析错误。
3. 修复语法。页面能够解析后,错误即会消失,**Publish** 按钮也会重新可用。
+对于 frontmatter 错误,请检查每个值都是有效的 YAML:为包含冒号或特殊字符的字符串加上引号,保持缩进一致,并关闭所有引号。有关支持的 frontmatter 字段,请参阅[页面元数据](/zh/organize/pages#page-metadata)。
+
-### 使用智能体修复错误
+## 使用智能体修复错误
1. 打开编辑器面板。
-2. 提示智能体修复所有无效的 MDX 或 frontmatter YAML。
+2. 提示智能体修复所有无效的 MDX 或 frontmatter YAML。如果不进行提及,智能体会以你打开的页面作为初始上下文。若要通过一次提示修复分支上的所有错误,请让智能体查找并修复所有存在无效 MDX 的页面。参见[智能体](/zh/editor/agent)。