mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
7d545c9699
* Add Markdown mode shortcuts to keyboard shortcuts reference Restructure the keyboard shortcuts page to cover both Visual mode and Markdown mode (Monaco editor). Visual mode shortcuts remain unchanged. New Markdown mode section documents standard VS Code shortcuts for find/replace, line manipulation, and multi-cursor editing. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * update keyboard shortcuts * remove out of date screenshots * copy edit index * add missing images * add info to pages * copy edit * concision for media page * copy edit publish * update live preview * update index * add features to index --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
78 lines
4.3 KiB
Plaintext
78 lines
4.3 KiB
Plaintext
---
|
|
title: "Publish changes in the web editor"
|
|
sidebarTitle: "Publish"
|
|
description: "Save your work and publish changes to your documentation site."
|
|
keywords: ["editor", "publish", "changes", "branches", "pull requests"]
|
|
---
|
|
|
|
## Publishing workflows
|
|
|
|
The editor supports two workflows for publishing documentation updates. The workflow you use depends on your repository's branch protection rules and the branch you work on.
|
|
|
|
* **Create pull requests**: If your repository has a branch protection rule that requires pull requests before changes can merge into your deployment branch, the editor creates a pull request when you publish changes.
|
|
* **Publish directly**: If your repository has no branch protection rules, your changes merge to the deployment branch and deploy immediately when you publish.
|
|
|
|
| Branch type | Branch protection | Publishing workflow |
|
|
|-------------|-------------------|------------------------------|
|
|
| <Tooltip headline="Deployment branch" tip="The branch that publishes to your live documentation site, typically 'main'.">Deployment branch</Tooltip> | None | Commits and deploys changes |
|
|
| Deployment branch | Pull requests required | Creates a pull request |
|
|
| <Tooltip headline="Feature branch" tip="An isolated branch where you work on updates before merging to your deployment branch.">Feature branch</Tooltip> | None | Merges changes to deployment branch and deploys changes |
|
|
| Feature branch | Pull requests required | Creates a pull request |
|
|
|
|
<Tip>
|
|
Configure branch protection rules in your Git provider to require pull requests. See [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) in the GitHub docs or [Protected branches](https://docs.gitlab.com/user/project/repository/branches/protected/) in the GitLab docs.
|
|
</Tip>
|
|
|
|
## Save changes
|
|
|
|
As you edit, the editor tracks your changes.
|
|
|
|
- New or deleted files.
|
|
- Content edits in pages.
|
|
- Navigation structure changes.
|
|
- Media uploads and organization.
|
|
- Configuration updates.
|
|
|
|
When you work on your deployment branch, your changes save automatically.
|
|
|
|
<Frame caption="Changes on a deployment branch.">
|
|
<img src="/images/editor/toolbar-light.png" alt="Web editor toolbar showing one pending change." className="block dark:hidden" />
|
|
<img src="/images/editor/toolbar-dark.png" alt="Web editor toolbar showing one pending change." className="hidden dark:block" />
|
|
</Frame>
|
|
|
|
When you work on a feature branch, you can save changes to the branch as <Tooltip headline="Commit" tip="A commit is a saved snapshot of your changes in Git.">commits</Tooltip>.
|
|
|
|
<Frame caption="Changes on a feature branch.">
|
|
<img src="/images/editor/toolbar-branch-light.png" alt="Web editor toolbar showing one pending change and the Save as commit button on a feature branch." className="block dark:hidden" />
|
|
<img src="/images/editor/toolbar-branch-dark.png" alt="Web editor toolbar showing one pending change and the Save as commit button on a feature branch." className="hidden dark:block" />
|
|
</Frame>
|
|
|
|
To discard changes, click **Undo changes** beside a file name in the **Changes** dropdown.
|
|
|
|
### 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.
|
|
|
|
The **Publish** button is disabled when there are no pending changes or when a pull request for the current branch is already open.
|
|
|
|
## Resolve conflicts
|
|
|
|
Conflicts occur when your branch and the deployment branch have incompatible changes to the same files.
|
|
|
|
### What causes conflicts
|
|
|
|
Conflicts happen when:
|
|
|
|
- You and another team member edit the same lines in a file.
|
|
- Files are moved or deleted in one branch but modified in another.
|
|
|
|
### Resolve conflicts
|
|
|
|
The editor displays warnings when conflicts prevent operations like publishing or switching branches. To resolve conflicts, follow the instructions in the editor to choose which changes to keep.
|
|
|
|
## Commit signing
|
|
|
|
Sign commits with your GitHub account by authorizing it in your [account settings](https://dashboard.mintlify.com/settings/account). Without authorization, the Mintlify GitHub App signs commits made in the web editor.
|
|
|
|
Attributing commits to your account maintains an accurate history of who made changes to your documentation.
|