The web editor is a visual interface for creating, editing, and reviewing documentation directly in your browser.The web editor offers a What-You-See-Is-What-You-Get (WYSIWYG) experience while maintaining synchronization with your Git repository, which lets you see updates in real time and collaborate with your team on documentation changes.
The web editor lets you write and edit your documentation in your browser without requiring local development tools or using the command line. You should use the web editor if you want to maintain your documentation in one place with one tool.The CLI is a command line tool that allows you to create and manage your documentation locally using the IDE of your choice. You should use the CLI if you want to integrate documentation into your existing development workflow.Both the web editor and CLI are fully integrated with your Git repository, so you can use them interchangeably and different members of your team can use either tool based on their preferences.
The web editor offers two modes to accommodate different editing preferences and needs.You can switch between natural modes at any time using the toggle in the top right corner of the editor toolbar.
Visual mode provides a WYSIWYG experience where the changes that you make in the editor are the changes that will be published to your documentation site. This mode is ideal for when you want to see how your changes will look in real-time.
Markdown mode provides direct access to the underlying MDX code of your documentation. This mode is preferable when you need precise control over component properties or when you prefer to write in Markdown/MDX syntax.
Publishing directly updates your configured deployment branch. For collaborative workflows, consider using branches and pull requests instead.
When you’re ready to make your changes live, click the Publish button in the top-right corner of the web editor.Your changes will be deployed to your production site immediately.
To save your changes on a branch, select the Save Changes button in the top-right corner of the editor.When you are working on a branch, your changes are not automatically saved.
You can review pull requests in your Git platform (GitHub, GitLab).After you create a pull request, you can see a preview deployment of the changes.After a reviewer approves a pull request, you can merge the pull request into your main branch and the changes will be deployed to your live documentation site.
Understanding the following terms can help you work more effectively with the web editor and the Git workflow.
Repository
A repository (or repo) is where your documentation files are stored, along with their revision history. The web editor connects to your Git repository to fetch and store documentation content.
Commit
A commit is a snapshot of changes to your documentation at a specific point in time. When you publish changes in the web editor, you’re creating a commit in your Git repository.
Branch
A branch is a parallel version of your documentation that allows you to work on changes without affecting the main version. The web editor allows you to create and switch between branches.
Pull Request
A pull request (or PR) is a proposal to merge changes from one branch into another, typically from a feature branch into the main branch. PRs facilitate review and discussion before changes are incorporated.
Diff
A diff (or difference) shows the specific changes between two versions of a file. When reviewing pull requests, diffs highlight what has been added, removed, or modified.