diff --git a/docs.json b/docs.json index d680f9057..53c39f92f 100644 --- a/docs.json +++ b/docs.json @@ -25,16 +25,7 @@ "index", "quickstart", "installation", - { - "group": "Visual editor", - "pages": [ - "editor/getting-started", - "editor/content-management", - "editor/publishing", - "editor/keyboard-shortcuts", - "editor/troubleshooting" - ] - }, + "editor", "ai-native", "migration" ] @@ -1505,8 +1496,24 @@ "destination": "api-reference/assistant/*" }, { - "source": "editor", - "destination": "editor/getting-started" + "source": "editor/getting-started", + "destination": "editor" + }, + { + "source": "editor/content-management", + "destination": "editor" + }, + { + "source": "editor/publishing", + "destination": "editor" + }, + { + "source": "editor/keyboard-shortcuts", + "destination": "editor" + }, + { + "source": "editor/troubleshooting", + "destination": "editor" }, { "source": "guides/analytics", diff --git a/editor.mdx b/editor.mdx new file mode 100644 index 000000000..8326749fb --- /dev/null +++ b/editor.mdx @@ -0,0 +1,393 @@ +--- +title: "Visual editor" +description: "Create, maintain, and publish documentation in your browser" +--- + +Mintlify visual editor interface in light mode + +Mintlify visual editor interface in dark mode + +Access the visual editor from your [dashboard](https://dashboard.mintlify.com/editor) to manage your documentation directly in your browser. + +- **WYSIWYG editing**: Make changes to your documentation using a what-you-see-is-what-you-get (WYSIWYG) editor that shows how your content will look when published. +- **Git synchronization**: All changes automatically sync with your Git repository to maintain version control. +- **Team collaboration**: Multiple people can work on documentation simultaneously. +- **Component integration**: Add callouts, code blocks, and other components with slash commands. +- **No setup required**: Start writing immediately from your dashboard. + +## Overview + +Here is how you'll typically work in the visual editor: + + + + Create a branch or make changes directly to your deployment branch. We recommend creating a branch so that you can preview your changes before they go live. + + + Navigate to an existing file in the sidebar or create a new one using the file explorer. + + + Make changes in the visual editor. Press / to open the component menu. + + + Visual mode shows you how your changes will appear on your live site. Use this to verify everything looks correct. + + + If you're working on your deployment branch, publish your changes directly from the visual editor. On other branches, you'll create a pull request for review before publishing. + + + +## Editor modes + +The visual editor has two modes to accommodate different editing preferences and needs: visual mode and Markdown mode. + +Use the mode toggle in the editor toolbar to switch modes. + + + Mode toggle icons highlighted in the visual editor. + Mode toggle icons highlighted in the visual editor. + + +### Visual mode + +Visual mode provides a WYSIWYG experience where changes that you make in the editor reflect how your published documentation will look. This mode is ideal for when you want to see how your changes will look in real-time. + + + Visual editing mode in the Mintlify visual editor + Visual editing mode in the Mintlify visual editor + + +### Markdown mode + +Markdown mode provides direct access to the underlying `MDX` code of your documentation. This mode is ideal for when you need precise control over component properties or when you prefer to write in Markdown syntax. + + + Markdown mode in the Mintlify visual editor + Markdown mode in the Mintlify visual editor + + +## Manage content + +### Navigate your files + +Use the sidebar file explorer to browse your documentation files. Click on any file to open it in the editor. + +Press Command + P on macOS or Ctrl + P on Windows to search for files by name. + +### Create new pages + +Select the **Create a new file** icon in the file explorer sidebar. + + +Files menu in the visual editor +Files menu in the visual editor in dark mode + + +Filenames are automatically appended with a `.mdx` extension. To change the file type, click the file extension. Select the file type you want from the dropdown menu. + + +File extension menu in the visual editor. +File extension menu in the visual editor in dark mode. + + +### Rename pages + +To rename a page, click the kebab menu icon for the file you want to rename. Select **Rename** from the dropdown menu. + + +Rename page in the visual editor. +Rename page in the visual editor in dark mode. + + +### Delete pages + +To delete a page, click the kebab menu icon for the file you want to delete. Select **Delete** from the dropdown menu. + + +Delete page in the visual editor. +Delete page in the visual editor in dark mode. + + + +### Organize your navigation + +Edit your `docs.json` file to add new pages and remove deleted pages from your site navigation. See [Navigation](/organize/navigation) for more information on how to organize pages. + +**Example: Add a Themes page to the Profile group** + +In this example, you created a new page titled Themes and you want to add it to the Profile group in your documentation. Add the path to the new page to the `pages` array of the `Profile` group in your `docs.json` file for it to appear in your site navigation. + +```json title="Adding a Themes page to the Profile group" highlight="18" +{ + "navigation": { + "groups": [ + { + "group": "Getting started", + "pages": [ + "index", + "quickstart", + "installation" + ] + }, + { + "group": "Profile", + "pages": [ + "settings", + "account-types", + "dashboard", + "themes" + ] + } + ] + } +} +``` + +### Edit content + +Make changes to your pages using visual mode or Markdown mode in the editor. + +In visual mode, press / to open the component menu. Add content blocks, callouts, code blocks, and other components to customize your documentation. + + + The unfurled component menu emphasized in the Mintlify visual editor + The unfurled component menu emphasized in the Mintlify visual editor + + +In Markdown mode, you directly edit the `MDX` of your pages. This can be helpful when you need to: + +- Set specific component properties +- Work with complex nested components +- Copy and paste `MDX` content from other sources + +See [Format text](/create/text) and [Format code](/create/code) for more information on how to write using Markdown syntax. + +## Publish your changes + +The branch that you work on determines how the editor publishes your changes: + +* **Deployment branch**: Publishing updates your live site immediately. +* **Other branches**: Publishing creates a pull request so you can review changes before deploying them to production. + + + The publish button emphasized in the Mintlify visual editor + The publish button emphasized in the Mintlify visual editor + + +### Pull requests and reviewing changes + +Pull requests let you propose changes from your branch so that other people can review them before merging into your live documentation. This helps ensure that your changes are correct and gives your team a chance to collaborate on content. + + + Even if you're working solo, pull requests are valuable for previewing changes and maintaining a clear history of updates. + + +#### Create a pull request + + + + Select **Save Changes** to save all changes on your branch. + + + Select **Publish Pull Request** from the editor toolbar. + + + Write a clear title and description explaining: + - What changes you made + - Why you made them + - Any specific areas that need review + + + Select **Publish Pull Request**. The editor will provide a link to view your pull request. + + + Publish pull request button emphasized in the Mintlify visual editor + Publish pull request button emphasized in the Mintlify visual editor + + + + +#### Review pull requests + +Once your pull request is created: + +1. **Review changes**: You and your team members can review your pull request in your Git provider like GitHub or GitLab. +2. **Leave feedback**: Add comments or request changes. +3. **Make additional changes**: Make additional changes in the visual editor. When you save changes, the editor pushes them to your pull request. +4. **Approve**: Approve the pull request when you're satisfied with the changes. +5. **Merge**: Merge the pull request when you're ready to deploy your changes to production. + +## Keyboard shortcuts + +The visual editor supports all common keyboard shortcuts such as copy, paste, undo, and select all, and the following shortcuts: + +| Command | macOS | Windows | +|:--------|:------|:--------| +| **Search files** | Cmd + P | Control + P | +| **Add link to highlighted text** | Cmd + K | Control + K | +| **Add line break** | Cmd + Enter | Control + Enter | +| **Bold** | Cmd + B | Control + B | +| **Italic** | Cmd + I | Control + I | +| **Underline** | Cmd + U | Control + U | +| **Strikethrough** | Cmd + Shift + S | Control + Shift + S | +| **Code** | Cmd + E | Control + E | +| **Normal text** | Cmd + Alt + 0 | Control + Alt + 0 | +| **Heading 1** | Cmd + Alt + 1 | Control + Alt + 1 | +| **Heading 2** | Cmd + Alt + 2 | Control + Alt + 2 | +| **Heading 3** | Cmd + Alt + 3 | Control + Alt + 3 | +| **Heading 4** | Cmd + Alt + 4 | Control + Alt + 4 | +| **Ordered list** | Cmd + Shift + 7 | Control + Shift + 7 | +| **Unordered list** | Cmd + Shift + 8 | Control + Shift + 8 | +| **Blockquote** | Cmd + Shift + B | Control + Shift + B | +| **Subscript** | Cmd + , | Control + , | +| **Superscript** | Cmd + . | Control + . | + +## Troubleshooting + +Find solutions to common issues you might encounter while using the visual editor. + + + + **Possible causes:** + - Deployment is still in progress + - Browser caching issues + - Build or deployment errors + + **Solutions:** + 1. Check deployment status in your dashboard. + 2. Hard refresh your browser (Ctrl + F5 or Cmd + Shift + R) + 3. Clear your browser cache. + + + + **Possible causes:** + - Insufficient permissions to the Git repository + - Authentication issues with your Git provider + + **Solutions:** + 1. Verify you have correct access to the repository. + 2. Check if your Git integration is properly configured. + 3. Review the [Editor Permissions](/dashboard/permissions) documentation. + + + **Possible causes:** + - Network connectivity problems + - Large documentation repositories + + **Solutions:** + 1. Check your internet connection. + 2. Refresh the page. + 3. Contact support if the issue persists. + + + **Possible causes:** + - Invalid MDX syntax in files + - Missing or corrupted files + - Large file sizes causing timeouts + + **Solutions:** + 1. Check the file syntax for MDX formatting errors + 2. Verify the file exists in your repository. + + + +## Next steps + +- Learn fundamental [Git concepts](/guides/git-concepts) +- Learn best practices for collaborating with [branches](/guides/branches) diff --git a/editor/content-management.mdx b/editor/content-management.mdx deleted file mode 100644 index 5b11cbe4e..000000000 --- a/editor/content-management.mdx +++ /dev/null @@ -1,110 +0,0 @@ ---- -title: "Managing content" -description: "Create, edit, and organize your documentation pages" ---- - -## Navigating your files - -Use the sidebar file explorer to browse your documentation files. Click on any file to open it in the editor. - -Press Command + P (Ctrl + P on Windows) to search for files by name. - -## Creating new pages - - - - Select the **Create a new file** icon in the file explorer sidebar. - - Files menu in the web editor - Files menu in the web editor in dark mode - - - Filenames must end in `.mdx`. For example, `api-reference.mdx` or `getting-started.mdx`. - - - Press Enter to create the file. It will open automatically in the editor, ready for content to be added. - - - -## Organizing your navigation - -Add new pages to your site navigation by editing your `docs.json` file. - - - - Find and open the `docs.json` file in your root directory using the file explorer. - - - Find the spot in the `docs.json` file where you want to add your new page. - - - Insert your page filename (without the `.mdx` extension) in the appropriate group's `pages` array. - - - -### Example: Adding a themes page - -```json title="Adding a themes page to the Profile group" highlight="18" -{ - "navigation": { - "groups": [ - { - "group": "Getting started", - "pages": [ - "index", - "quickstart", - "installation" - ] - }, - { - "group": "Profile", - "pages": [ - "settings", - "account-types", - "dashboard", - "themes" - ] - } - ] - } -} -``` - -## Editing content - -Make changes to your pages using visual mode or Markdown mode in the editor. - -In visual mode, press / to open the component menu. Add content blocks, callouts, code blocks, and other components to customize your documentation. - - - The unfurled component menu emphasized in the Mintlify web editor - The unfurled component menu emphasized in the Mintlify web editor - - -In Markdown mode, you can directly edit the `MDX` of your pages. This can be helpful when you need to: - -- Set specific component properties -- Work with complex nested components -- Copy and paste `MDX` content from other sources diff --git a/editor/getting-started.mdx b/editor/getting-started.mdx deleted file mode 100644 index 73763ee79..000000000 --- a/editor/getting-started.mdx +++ /dev/null @@ -1,107 +0,0 @@ ---- -title: "Getting started with the web editor" -sidebarTitle: "Getting started" -description: "Learn how to create and edit documentation with the web editor" ---- - -Mintlify web editor interface in light mode - -Mintlify web editor interface in dark mode - -The web editor is a visual interface for creating, editing, and reviewing documentation directly in your browser. - -- **Visual editing**: Make changes to your documentation using a what-you-see-is-what-you-get (WYSIWYG) editor that shows how your content will look when published. -- **Git synchronization**: All changes automatically sync with your Git repository to maintain version control. -- **Team collaboration**: Multiple people can work on documentation simultaneously. -- **Component integration**: Add callouts, code blocks, and other components with slash commands. -- **No setup required**: Start writing immediately from your dashboard. - -## Web editor workflow - -Here is how you'll typically work in the web editor: - - - - Create a branch or make changes directly to your deployment branch. We recommend creating a branch so that you can preview your changes before they go live. - - - Navigate to an existing file in the sidebar or create a new one using the file explorer. - - - Make changes in the web editor. Try switching between visual mode and Markdown mode using the toggle in the top-right corner to see which mode you prefer. - - - Visual mode shows you how your changes will appear on your live site. Use this to verify everything looks correct. - - - If you're working on your deployment branch, publish your changes directly from the web editor. On other branches, you'll create a pull request for review before publishing. - - - -## Editor modes - -The web editor has two modes to accommodate different editing preferences and needs. Use the toggle in the top right corner of the editor toolbar to switch between editing modes. - - - Mode toggle icons highlighted in the web editor. - Mode toggle icons highlighted in the web editor. - - -### Visual mode - -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. - -Press `/` to open the component menu and add styled content, callouts, code snippets, or other components. - - - Visual editing mode in the Mintlify web editor - Visual editing mode in the Mintlify web editor - - -### Markdown mode - -Markdown mode provides direct access to the underlying `MDX` code of your documentation. This mode is ideal for when you need precise control over component properties or when you prefer to write in Markdown syntax. - - - Markdown mode in the Mintlify web editor - Markdown mode in the Mintlify Web Editor - - -## Next steps - -- Learn fundamental [Git concepts](/guides/git-concepts). -- Learn best practices for collaborating with [branches](/guides/branches). -- Explore [content management](/editor/content-management) with the web editor. -- Understand [publishing options](/editor/publishing) for different scenarios. diff --git a/editor/keyboard-shortcuts.mdx b/editor/keyboard-shortcuts.mdx deleted file mode 100644 index 4471ff553..000000000 --- a/editor/keyboard-shortcuts.mdx +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: "Keyboard shortcuts" -description: "Shortcuts for the web editor" ---- - -The web editor supports all common keyboard shortcuts such as copy, paste, undo, and select all, and the following shortcuts: - -| Command | macOS | Windows | -|:--------|:------|:--------| -| **Search files** | Cmd + P | Control + P | -| **Add link to highlighted text** | Cmd + K | Control + K | -| **Add line break** | Cmd + Enter | Control + Enter | -| **Bold** | Cmd + B | Control + B | -| **Italic** | Cmd + I | Control + I | -| **Underline** | Cmd + U | Control + U | -| **Strikethrough** | Cmd + Shift + S | Control + Shift + S | -| **Code** | Cmd + E | Control + E | -| **Normal text** | Cmd + Alt + 0 | Control + Alt + 0 | -| **Heading 1** | Cmd + Alt + 1 | Control + Alt + 1 | -| **Heading 2** | Cmd + Alt + 2 | Control + Alt + 2 | -| **Heading 3** | Cmd + Alt + 3 | Control + Alt + 3 | -| **Heading 4** | Cmd + Alt + 4 | Control + Alt + 4 | -| **Ordered list** | Cmd + Shift + 7 | Control + Shift + 7 | -| **Unordered list** | Cmd + Shift + 8 | Control + Shift + 8 | -| **Blockquote** | Cmd + Shift + B | Control + Shift + B | -| **Subscript** | Cmd + , | Control + , | -| **Superscript** | Cmd + . | Control + . | diff --git a/editor/publishing.mdx b/editor/publishing.mdx deleted file mode 100644 index 8580c201f..000000000 --- a/editor/publishing.mdx +++ /dev/null @@ -1,73 +0,0 @@ ---- -title: "Publishing your changes" -description: "Deploy your documentation updates directly to production or through pull requests" ---- - -How your changes are published depends on which branch you are working on: - -* **Deployment branch**: Publishing updates your live site immediately. -* **Other branches**: Publishing creates a pull request so you can review changes before they are deployed to production. - - - The publish button emphasized in the Mintlify web editor - The publish button emphasized in the Mintlify web editor - - -## Pull requests and reviewing changes - -Pull requests let you propose changes from your branch so that other people can review them before merging into your live documentation. This helps ensure that your changes are correct and gives your team a chance to collaborate on content. - - - Even if you're working solo, pull requests are valuable for previewing changes and maintaining a clear history of updates. - - -### Creating a pull request - - - - Make sure all your changes are saved on your branch using **Save Changes**. - - - Select **Publish Pull Request** in the top-right corner of the editor. - - - Write a clear title and description explaining: - - What changes you made - - Why you made them - - Any specific areas that need review - - - Select **Publish Pull Request**. The editor will provide a link to view your pull request. - - - Publish pull request button emphasized in the Mintlify web editor - Publish pull request button emphasized in the Mintlify web editor - - - - -## Reviewing pull requests - -Once your pull request is created: - -1. **Review changes**: You and your team members can review your pull request in your Git provider like GitHub or GitLab. -2. **Leave feedback**: Add comments or request changes. -3. **Make additional changes**: Make additional changes in the web editor. When you save changes, the editor pushes them to your pull request. -4. **Approve**: Approve the pull request when you're satisfied with the changes. -5. **Merge**: Merge the pull request when you're ready to deploy your changes to production. diff --git a/editor/troubleshooting.mdx b/editor/troubleshooting.mdx deleted file mode 100644 index 1e0aecdd4..000000000 --- a/editor/troubleshooting.mdx +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "Troubleshooting the web editor" -sidebarTitle: "Troubleshooting" -description: "Solutions to common issues" ---- - -Find solutions to common issues you might encounter while using the web editor. - - - - **Possible causes:** - - Deployment is still in progress - - Browser caching issues - - Build or deployment errors - - **Solutions:** - 1. Check deployment status in your dashboard. - 2. Hard refresh your browser (Ctrl + F5 or Cmd + Shift + R) - 3. Clear your browser cache. - - - - **Possible causes:** - - Insufficient permissions to the Git repository - - Authentication issues with your Git provider - - **Solutions:** - 1. Verify you have correct access to the repository. - 2. Check if your Git integration is properly configured. - 3. Review the [Editor Permissions](/dashboard/permissions) documentation. - - - **Possible causes:** - - Network connectivity problems - - Large documentation repositories - - **Solutions:** - 1. Check your internet connection. - 2. Refresh the page. - 3. Contact support if the issue persists. - - - **Possible causes:** - - Invalid MDX syntax in files - - Missing or corrupted files - - Large file sizes causing timeouts - - **Solutions:** - 1. Check the file syntax for MDX formatting errors - 2. Verify the file exists in your repository. - - diff --git a/images/editor/delete-page-dark.png b/images/editor/delete-page-dark.png new file mode 100644 index 000000000..bbec02d6d Binary files /dev/null and b/images/editor/delete-page-dark.png differ diff --git a/images/editor/delete-page-light.png b/images/editor/delete-page-light.png new file mode 100644 index 000000000..8d5d2b9c0 Binary files /dev/null and b/images/editor/delete-page-light.png differ diff --git a/images/editor/file-type-dark.png b/images/editor/file-type-dark.png new file mode 100644 index 000000000..3d96c6ef1 Binary files /dev/null and b/images/editor/file-type-dark.png differ diff --git a/images/editor/file-type-light.png b/images/editor/file-type-light.png new file mode 100644 index 000000000..13d89a2d3 Binary files /dev/null and b/images/editor/file-type-light.png differ diff --git a/images/editor/rename-dark.png b/images/editor/rename-dark.png new file mode 100644 index 000000000..9deb71296 Binary files /dev/null and b/images/editor/rename-dark.png differ diff --git a/images/editor/rename-light.png b/images/editor/rename-light.png new file mode 100644 index 000000000..46195e44e Binary files /dev/null and b/images/editor/rename-light.png differ