Skip to content

Commit 6f0cf51

Browse files
authored
Document support for .md (#1900)
* replace `MDX` with `Markdown` where appropriate * favor MDX * Emphasize .md is for migration, .mdx is recommended * favor MDX * missing words
1 parent 660d2f0 commit 6f0cf51

File tree

12 files changed

+33
-31
lines changed

12 files changed

+33
-31
lines changed

api-playground/mdx-setup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Document API endpoints manually with MDX files."
44
keywords: ["API documentation", "endpoint documentation"]
55
---
66

7-
You can manually define API endpoints in individual pages. This approach is useful for small APIs or prototyping.
7+
You can manually define API endpoints in individual MDX pages. This approach is useful for small APIs or prototyping.
88

99
## Setup
1010

@@ -38,7 +38,7 @@ You can manually define API endpoints in individual pages. This approach is usef
3838
</Step>
3939

4040
<Step title="Create your endpoint pages">
41-
Create an `MDX` file for each endpoint. Define the `title` and `api` in the frontmatter:
41+
Create an MDX file for each endpoint. Define the `title` and `api` in the frontmatter:
4242

4343
```mdx
4444
---

api-playground/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ This example configures the API playground to be interactive with example code s
133133

134134
### Custom endpoint pages
135135

136-
When you need more control over your API documentation, use the `x-mint` extension in your OpenAPI specification or create individual `MDX` pages for your endpoints.
136+
When you need more control over your API documentation, use the `x-mint` extension in your OpenAPI specification or create individual MDX pages for your endpoints.
137137

138138
Both options allow you to:
139139

@@ -143,7 +143,7 @@ Both options allow you to:
143143

144144
The `x-mint` extension is recommended so that all of your API documentation is automatically generated from your OpenAPI specification and maintained in one file.
145145

146-
Individual `MDX` pages are recommended for small APIs or when you want to experiment with changes on a per-page basis.
146+
Individual MDX pages are recommended for small APIs or when you want to experiment with changes on a per-page basis.
147147

148148
## Further reading
149149

customize/custom-scripts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Tailwind CSS arbitrary values are not supported. For custom values, use the `sty
2424

2525
## Custom CSS
2626

27-
Add CSS files to your repository and their defined class names will be applied and available in all of your `MDX` files.
27+
Add CSS files to your repository and their defined class names will be applied and available in all of your MDX files.
2828

2929
### Adding `style.css`
3030

customize/react-components.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { ColorGenerator } from "/snippets/color-generator.jsx";
1010

1111
## Using React components
1212

13-
You can build React components directly in your `MDX` files using [React hooks](https://react.dev/reference/react/hooks).
13+
You can build React components directly in your MDX files using [React hooks](https://react.dev/reference/react/hooks).
1414

1515
### Example
1616

@@ -92,11 +92,11 @@ The counter renders as an interactive React component.
9292

9393
## Importing components
9494

95-
To import React components in your `MDX` files, the component files must be located in the `snippets` folder. You can then import them into any `MDX` page in your documentation. Learn more about [reusable snippets](/create/reusable-snippets).
95+
To import React components in your MDX files, the component files must be located in the `snippets` folder. You can then import them into any MDX page in your documentation. Learn more about [reusable snippets](/create/reusable-snippets).
9696

9797
### Example
9898

99-
This example declares a `ColorGenerator` component that uses multiple React hooks and then uses it in an `MDX` file.
99+
This example declares a `ColorGenerator` component that uses multiple React hooks and then uses it in an MDX file.
100100

101101
Create `color-generator.jsx` file in the `snippets` folder:
102102

@@ -213,7 +213,7 @@ export const ColorGenerator = () => {
213213
}
214214
```
215215

216-
Import the `ColorGenerator` component and use it in an `MDX` file:
216+
Import the `ColorGenerator` component and use it in an MDX file:
217217

218218
```mdx
219219
import { ColorGenerator } from "/snippets/color-generator.jsx"

deploy/personalization-setup.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ type User = {
7575
path="content"
7676
type="object"
7777
>
78-
Custom data accessible in your `MDX` content via the `user` variable. Use this for dynamic personalization throughout your documentation.
78+
Custom data accessible in your MDX content via the `user` variable. Use this for dynamic personalization throughout your documentation.
7979
8080
**Basic example**:
8181
```json
8282
{ "firstName": "Ronan", "company": "Acme Corp", "plan": "Enterprise" }
8383
```
8484
85-
**Usage in `MDX`**:
85+
**Usage in MDX**:
8686
```mdx
8787
Welcome back, {user.firstName}! Your {user.plan} plan includes...
8888
```

editor.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Visual mode provides a WYSIWYG experience where changes that you make in the edi
8888

8989
### Markdown mode
9090

91-
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.
91+
Markdown mode provides direct access to the files that make up your documentation. This mode is ideal for when you need precise control over component properties or when you prefer to write in MDX syntax.
9292

9393
<Frame>
9494
<img
@@ -224,9 +224,7 @@ In this example, you created a new page titled Themes and you want to add it to
224224

225225
Make changes to your pages using visual mode or Markdown mode in the editor.
226226

227-
In visual mode, press <kbd>/</kbd>
228-
229-
to open the component menu. Add content blocks, callouts, code blocks, and other components to customize your documentation.
227+
In visual mode, press <kbd>/</kbd> to open the component menu. Add content blocks, callouts, code blocks, and other components to customize your documentation.
230228

231229
<Frame>
232230
<img
@@ -242,13 +240,13 @@ In visual mode, press <kbd>/</kbd>
242240
/>
243241
</Frame>
244242

245-
In Markdown mode, you directly edit the `MDX` of your pages. This can be helpful when you need to:
243+
In Markdown mode, you can directly edit the MDX of your pages. This can be helpful when you need to:
246244

247245
- Set specific component properties
248246
- Work with complex nested components
249-
- Copy and paste `MDX` content from other sources
247+
- Copy and paste MDX content from other sources
250248

251-
See [Format text](/create/text) and [Format code](/create/code) for more information on how to write using Markdown syntax.
249+
See [Format text](/create/text) and [Format code](/create/code) for more information on how to write using MDX syntax.
252250

253251
## Publish your changes
254252

guides/migrating-from-mdx.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Migrate to automated OpenAPI generation with flexible navigation."
55
keywords: ["API migration", "mint migrate-mdx", "OpenAPI migration", "x-mint extension"]
66
---
77

8-
If you are currently using individual `MDX` pages for your API endpoints, you can migrate to autogenerating pages from your OpenAPI specification while retaining the customizability of individual pages. This can help you reduce the number of files you need to maintain and improve the consistency of your API documentation.
8+
If you are currently using individual MDX pages for your API endpoints, you can migrate to autogenerating pages from your OpenAPI specification while retaining the customizability of individual pages. This can help you reduce the number of files you need to maintain and improve the consistency of your API documentation.
99

1010
You can define metadata and content for each endpoint in your OpenAPI specification and organize endpoints where you want them in your navigation.
1111

@@ -64,7 +64,7 @@ The migration tool does not support previewing changes before applying them.
6464
</Step>
6565

6666
<Step title="Update your navigation structure.">
67-
Replace `MDX` page references with OpenAPI endpoints in your `docs.json`.
67+
Replace MDX page references with OpenAPI endpoints in your `docs.json`.
6868

6969
```json
7070
"navigation": {
@@ -90,7 +90,7 @@ The migration tool does not support previewing changes before applying them.
9090
</Step>
9191

9292
<Step title="Remove old MDX files.">
93-
After verifying your new navigation works correctly, remove the `MDX` endpoint files that you no longer need.
93+
After verifying your new navigation works correctly, remove the MDX endpoint files that you no longer need.
9494
</Step>
9595
</Steps>
9696

@@ -138,9 +138,9 @@ Organize different API versions using tabs or groups:
138138
}
139139
```
140140

141-
## When to use individual `MDX` pages
141+
## When to use individual MDX pages
142142

143-
Consider keeping individual `MDX` pages when you need:
143+
Consider keeping individual MDX pages when you need:
144144

145145
- Extensive custom content per endpoint like React components or lengthy examples.
146146
- Unique page layouts.

installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ This command converts individual MDX endpoint pages to autogenerated pages defin
172172

173173
## Formatting
174174

175-
While developing locally, we recommend using extensions in your IDE to recognize and format `MDX` files.
175+
While developing locally, we recommend using extensions in your IDE to recognize and format MDX files.
176176

177177
If you use Cursor, Windsurf, or VS Code, we recommend the [MDX VS Code extension](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) for syntax highlighting, and [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for code formatting.
178178

migration.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,21 @@ Migrate your documentation from any platform with full control over the process.
147147
To migrate your content to Mintlify, you will need:
148148

149149
- A valid `docs.json` for your site settings and navigation. See [Global settings](/organize/settings) and [Navigation](/organize/navigation) for more information.
150-
- An `MDX` file for each page of your documentation. See [Pages](/organize/pages) for more information.
150+
- A Markdown file (`.md` or `.mdx`) for each page of your documentation. MDX is the recommended format. See [Pages](/organize/pages) for more information.
151151
- (Optional) An OpenAPI specification for your API endpoint pages. See [OpenAPI setup](/api-playground/openapi-setup) for more information.
152152

153-
1. If your content is already in `MDX` format, copy the pages to your Mintlify project. Otherwise, convert your content to `MDX` format.
154-
2. Create your `docs.json` referencing the paths to your `MDX` pages.
153+
1. If your content is already in Markdown format, copy the content to your Mintlify project. Otherwise, convert your content to MDX format.
154+
2. Create your `docs.json` referencing the paths to your Markdown pages.
155155
3. If you have OpenAPI specifications, add them to your `docs.json` and configure the API playground.
156156

157+
<Tip>
158+
If you migrate your content as `.md` files, convert them to `.mdx` to support interactive features like React components.
159+
</Tip>
160+
157161
### Asset migration
158162

159163
1. Copy assets to your repository's `images/` directory.
160-
2. Update references in your `MDX` files:
164+
2. Update references in your Markdown files:
161165
```mdx
162166
![Alt text](/images/screenshot.png)
163167
```

organize/navigation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ With proper navigation configuration, you can organize your content so that user
1010

1111
## Pages
1212

13-
Pages are the most fundamental navigation component. Pages map to the MDX files that make up your documentation.
13+
Pages are the most fundamental navigation component. Each page is an MDX file in your documentation repository.
1414

1515
<img
1616
className="block dark:hidden pointer-events-none"

0 commit comments

Comments
 (0)