- An unclosed component tag, such as a
<Note>without a matching</Note>. - Malformed JSX in the page body, such as an unclosed brace in an expression.
- Frontmatter that isn’t valid YAML, such as inconsistent indentation or an unclosed quote.
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:- Click Publish in the toolbar to open the publish menu. The menu lists every changed file on your branch.
- 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
- Open the affected page in the editor.
- 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.
- Fix the syntax. Once the page parses, the error clears and the Publish button becomes available again.
Fix the error with the agent
- Open the editor panel.
- 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.