Skip to content

Commit 40d2e2c

Browse files
Add proper language support for syntax highlighting to all code blocks (#807)
* Add proper language support for syntax highlighting to all code blocks * Camel case inline code
1 parent 139e937 commit 40d2e2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+130
-128
lines changed

api-playground/customization/adding-sdk-examples.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Here is an example of code samples for a plant tracking app, which has both a Ba
2525
paths:
2626
/plants:
2727
get:
28-
...
28+
# ...
2929
x-codeSamples:
3030
- lang: bash
3131
label: List all unwatered plants

api-playground/customization/complex-data-types.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ org_with_users:
3232
users:
3333
type: array
3434
description: An array containing all users in the organization
35-
...
35+
# ...
3636
components:
3737
schemas:
3838
Org:
@@ -67,14 +67,14 @@ delivery_address:
6767
address_line_1:
6868
type: string
6969
description: The street address of the recipient
70-
...
70+
# ...
7171
- title: POBox
7272
type: object
7373
properties:
7474
box_number:
7575
type: string
7676
description: The number of the PO Box
77-
...
77+
# ...
7878
```
7979

8080
<ParamField body="delivery_address" type="object">

api-playground/customization/managing-page-visibility.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,24 @@ Here are examples of how to use each property in an OpenAPI schema document for
3939
"/plants": {
4040
"get": {
4141
"description": "Returns all plants from the store",
42-
"parameters": { ... },
43-
"responses": { ... }
42+
"parameters": { /*...*/ },
43+
"responses": { /*...*/ }
4444
}
4545
},
4646
"/hidden_plants": {
4747
"get": {
4848
"x-hidden": true,
4949
"description": "Returns all somewhat secret plants from the store",
50-
"parameters": { ... },
51-
"responses": { ... }
50+
"parameters": { /*...*/ },
51+
"responses": { /*...*/ }
5252
}
5353
},
5454
"/secret_plants": {
5555
"get": {
5656
"x-excluded": true,
5757
"description": "Returns all top secret plants from the store (do not publish this endpoint!)",
58-
"parameters": { ... },
59-
"responses": { ... }
58+
"parameters": { /*...*/ },
59+
"responses": { /*...*/ }
6060
}
6161
}
6262
},

api-playground/customization/multiple-responses.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ responses:
2828
countryCode: "GB"
2929
currencyCode: "GBP"
3030
taxRate: 0.20
31-
```
31+
```

api-playground/mdx/authentication.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A page's authentication method will override a global method if both are set.
2323
}
2424
```
2525

26-
```md Page Metadata
26+
```mdx Page Metadata
2727
---
2828
title: "Your page title"
2929
authMethod: "bearer"
@@ -46,7 +46,7 @@ authMethod: "bearer"
4646
}
4747
```
4848

49-
```md Page Metadata
49+
```mdx Page Metadata
5050
---
5151
title: "Your page title"
5252
authMethod: "basic"
@@ -70,7 +70,7 @@ authMethod: "basic"
7070
}
7171
```
7272

73-
```md Page Metadata
73+
```mdx Page Metadata
7474
---
7575
title: "Your page title"
7676
authMethod: "key"
@@ -84,7 +84,7 @@ authMethod: "key"
8484
The "none" authentication method is useful to disable authentication on a specific endpoint after setting a default in docs.json.
8585

8686
<CodeGroup>
87-
```md Page Metadata
87+
```mdx Page Metadata
8888
---
8989
title: "Your page title"
9090
authMethod: "none"

api-playground/mdx/configuration.mdx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
4040

4141
Each API endpoint page should have a corresponding `MDX` file. At the top of each file, define `title` and `api`:
4242

43-
```md
43+
```mdx
4444
---
4545
title: 'Create new user'
4646
api: 'POST https://api.mintlify.com/user'
@@ -61,11 +61,12 @@ To generate pages for API endpoints using `MDX`, configure your API settings in
6161

6262
You can override the globally-defined display mode for the API playground per page by adding `playground` at the top of the `MDX` file:
6363

64-
```md
64+
```mdx
6565
---
6666
title: 'Create new user'
6767
api: 'POST https://api.mintlify.com/user'
6868
playground: 'none'
69+
---
6970
```
7071

7172
</Step>
@@ -95,7 +96,7 @@ A page's authentication method will override a global method if both are set.
9596
}
9697
```
9798

98-
```md Page Metadata
99+
```mdx Page Metadata
99100
---
100101
title: "Your page title"
101102
authMethod: "bearer"
@@ -118,7 +119,7 @@ authMethod: "bearer"
118119
}
119120
```
120121

121-
```md Page Metadata
122+
```mdx Page Metadata
122123
---
123124
title: "Your page title"
124125
authMethod: "basic"
@@ -142,7 +143,7 @@ authMethod: "basic"
142143
}
143144
```
144145

145-
```md Page Metadata
146+
```mdx Page Metadata
146147
---
147148
title: "Your page title"
148149
authMethod: "key"
@@ -156,7 +157,7 @@ authMethod: "key"
156157
The `none` authentication method is useful to disable authentication on a specific endpoint after setting a default in docs.json.
157158

158159
<CodeGroup>
159-
```md Page Metadata
160+
```mdx Page Metadata
160161
---
161162
title: "Your page title"
162163
authMethod: "none"

api-playground/openapi-setup.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ If you want to reference an external OpenAPI file, add the file's URL to your `d
162162

163163
<CodeGroup>
164164

165-
```md Example
165+
```mdx Example
166166
---
167167
title: "Get users"
168168
description: "Returns all plants from the system that the user has access to"
@@ -172,7 +172,7 @@ version: "1.0"
172172
---
173173
```
174174

175-
```md Format
175+
```mdx Format
176176
---
177177
title: "title of the page"
178178
description: "description of the page"
@@ -225,14 +225,14 @@ You can create individual pages for any OpenAPI schema defined in an OpenAPI doc
225225

226226
<CodeGroup>
227227

228-
```md Example
228+
```mdx Example
229229
---
230230
openapi-schema: OrderItem
231231
---
232232
```
233233

234234

235-
```md Format
235+
```mdx Format
236236
---
237237
openapi-schema: "schema-key"
238238
---

api-playground/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ We recommend generating your API playground from an OpenAPI specification. See [
2525
Make sure that your OpenAPI specification file is valid using the [Swagger Editor](https://editor.swagger.io/) or [Mint CLI](https://www.npmjs.com/package/mint).
2626
</Info>
2727

28-
``` {2}
28+
```bash {2}
2929
/your-project
3030
|- docs.json
3131
|- openapi.json

api-playground/troubleshooting.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ If your API pages aren't displaying correctly, check these common configuration
3737

3838
Here's an example of how things might go wrong:
3939

40-
```md get-user.mdx
40+
```mdx get-user.mdx
4141
---
4242
openapi: "GET /users/{id}/"
4343
---
@@ -56,7 +56,7 @@ If your API pages aren't displaying correctly, check these common configuration
5656
in the `openapi` field, ensure the filename is correct. For example, if you have two OpenAPI
5757
documents `openapi/v1.json` and `openapi/v2.json`, your metadata might look like this:
5858

59-
```md api-reference/v1/users/get-user.mdx
59+
```mdx api-reference/v1/users/get-user.mdx
6060
---
6161
openapi: "v1 GET /users/{id}"
6262
---
@@ -73,4 +73,4 @@ If your API pages aren't displaying correctly, check these common configuration
7373
likely require you to configure CORS on your server, as these requests will now come directly
7474
from your users' browsers.
7575
</Accordion>
76-
</AccordionGroup>
76+
</AccordionGroup>

authentication-personalization/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Restrict which pages are visible to your users by adding `groups` fields to your
125125
126126
Users will only see pages for `groups` that they are in.
127127
128-
```md
128+
```mdx
129129
---
130130
title: "Managing your users"
131131
description: "Adding and removing users from your organization"

0 commit comments

Comments
 (0)