Skip to content

Commit a9d7cf0

Browse files
committed
chore: update README
- add sections on template generators
1 parent 4975f0e commit a9d7cf0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
161161
| `outputDir` | `string` | `null` | Desired output path for generated MDX and sidebar files. |
162162
| `proxy` | `string` | `null` | _Optional:_ Proxy URL to prepend to base URL when performing API requests from browser. |
163163
| `template` | `string` | `null` | _Optional:_ Customize MDX content with a desired template. |
164+
| `templateGenerators` | `object` | `null` | _Optional:_ Customize MDX content with generator functions. See below for a list of supported options. |
164165
| `infoTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **info** pages only. |
165166
| `tagTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **tag** pages only. |
166167
| `schemaTemplate` | `string` | `null` | _Optional:_ Customize MDX content for **schema** pages only. |
@@ -202,6 +203,17 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
202203

203204
> All versions will automatically inherit `sidebarOptions` from the parent/base config.
204205
206+
### templateGenerators
207+
208+
`templateGenerators` can be configured with the following options:
209+
210+
| Name | Type | Default | Description |
211+
| ------------------------ | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
212+
| `createIntroPageMD` | `function` | `null` | _Optional:_ Returns a string of the raw markdown body for API pages.<br/><br/>**Function type:** `() => string` |
213+
| `createInfoTemplateMD` | `function` | `null` | _Optional:_ Returns a string of the raw markdown body for info pages.<br/><br/>**Function type:** `() => string` |
214+
| `createTagTemplateMD` | `function` | `null` | _Optional:_ Returns a string of the raw markdown body for tag pages.<br/><br/>**Function type:** `() => string` |
215+
| `createSchemaTemplateMD` | `function` | `null` | _Optional:_ Returns a string of the raw markdown body for schema pages.<br/><br/>**Function type:** `() => string` |
216+
205217
### markdownGenerators
206218

207219
`markdownGenerators` can be configured with the following options:

0 commit comments

Comments
 (0)