diff --git a/editor/pages.mdx b/editor/pages.mdx index dde35205d..7ce394a50 100644 --- a/editor/pages.mdx +++ b/editor/pages.mdx @@ -74,6 +74,20 @@ Edit the MDX source code. See [Format text](/create/text) and [Format code](/create/code) for more information on MDX syntax. +### Diff view + +Review your unpublished changes before publishing by comparing your current edits against the last published version. Diff view is read-only — exit it to resume editing. + +To enter diff view, click a changed file in the publish popover. The editor switches to diff view and highlights the differences between your draft and the published version. If you are in visual mode, the editor shows a visual diff. If you are in Markdown mode, the editor shows a Markdown diff. + +While in diff view, you can: + +- **Switch diff modes**: Use the mode toggle to switch between visual diff and Markdown diff. +- **Navigate between changed files**: Click other files in the publish popover to compare them. +- **Exit diff view**: Click the button next to the mode toggle to return to editing. + +The diff view updates automatically when the published version changes, so you always see an accurate comparison. + ## Configure pages Configure page settings to control how pages appear in navigation, search results, and your site layout. diff --git a/editor/publish.mdx b/editor/publish.mdx index d32caed34..e80497632 100644 --- a/editor/publish.mdx +++ b/editor/publish.mdx @@ -54,6 +54,10 @@ When you work on a feature branch, save changes to the branch. To discard changes, click **Undo changes** beside a filename in the files changed dropdown. +## Review changes + +Click a changed file in the publish popover to open it in [diff view](/editor/pages#diff-view). The editor highlights the differences between your draft and the published version so you can review your edits before publishing. Click additional files in the popover to compare them without leaving diff view. + ## Publish your changes Click **Publish** in the toolbar. Depending on your workflow, your changes deploy immediately or create a pull request for you to merge in your Git provider. If you are on a feature branch, save your changes before publishing.