You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -181,7 +181,8 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
181
181
|`sidebarCollapsible`|`boolean`|`true`| Whether sidebar categories are collapsible by default. |
182
182
|`sidebarCollapsed`|`boolean`|`true`| Whether sidebar categories are collapsed by default. |
183
183
|`customProps`|`object`|`null`| Additional props for customizing a sidebar item. |
184
-
|`createDocItem`|`function`|`null`| Optional: Returns a `SidebarItemDoc` object, which allows for customisation of sidebar items. For example, add a class name in certain conditions, or add `customProps` to provide custom rendering. |
184
+
|`sidebarGenerators`|`object`|`null`| Optional: Customize sidebar rendering with callback functions. |
185
+
|`createDocItem`|`function`|`null`| Optional: Returns a `SidebarItemDoc` object, which allows for customisation of sidebar items. For example, add a class name in certain conditions, or add `customProps` to provide custom rendering. See below for a list of supported operations. |
185
186
186
187
> You may optionally configure a `sidebarOptions`. In doing so, an individual `sidebar.js` slice with the configured options will be generated within the respective `outputDir`.
187
188
@@ -208,6 +209,14 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
208
209
|`createTagPageMD`|`function`|`null`|_Optional:_ Returns a string of the raw markdown body for tag pages.<br/><br/>**Function type:**`(pageData: TagPageMetadata) => string`|
209
210
|`createSchemaPageMD`|`function`|`null`|_Optional:_ Returns a string of the raw markdown body for schema pages.<br/><br/>**Function type:**`(pageData: SchemaPageMetadata) => string`|
210
211
212
+
### sidebarGenerators
213
+
214
+
`sidebarGenerators` can be configured with the following options:
|`groupPathsBy`|`string`|`null`| Organize and group sidebar slice by specified option. Note: Currently, `groupPathsBy` only contains support for grouping by `tag` and `tagGroup`. |
180
-
|`categoryLinkSource`|`string`|`null`| Defines what source to use for rendering category link pages when grouping paths by tag. <br/><br/>The supported options are as follows: <br/><br/> `tag`: Sets the category link config type to `generated-index` and uses the tag description as the link config description. <br/><br/>`info`: Sets the category link config type to `doc` and renders the `info` section as the category link (recommended only for multi/micro-spec scenarios). <br/><br/>`none`: Does not create pages for categories, only groups that can be expanded/collapsed. |
181
-
|`sidebarCollapsible`|`boolean`|`true`| Whether sidebar categories are collapsible by default. |
182
-
|`sidebarCollapsed`|`boolean`|`true`| Whether sidebar categories are collapsed by default. |
183
-
|`customProps`|`object`|`null`| Additional props for customizing a sidebar item. |
|`groupPathsBy`|`string`|`null`| Organize and group sidebar slice by specified option. Note: Currently, `groupPathsBy` only contains support for grouping by `tag` and `tagGroup`. |
180
+
|`categoryLinkSource`|`string`|`null`| Defines what source to use for rendering category link pages when grouping paths by tag. <br/><br/>The supported options are as follows: <br/><br/> `tag`: Sets the category link config type to `generated-index` and uses the tag description as the link config description. <br/><br/>`info`: Sets the category link config type to `doc` and renders the `info` section as the category link (recommended only for multi/micro-spec scenarios). <br/><br/>`none`: Does not create pages for categories, only groups that can be expanded/collapsed. |
181
+
|`sidebarCollapsible`|`boolean`|`true`| Whether sidebar categories are collapsible by default. |
182
+
|`sidebarCollapsed`|`boolean`|`true`| Whether sidebar categories are collapsed by default. |
183
+
|`customProps`|`object`|`null`| Additional props for customizing a sidebar item. |
184
+
|`sidebarGenerators`|`object`|`null`| Optional: Customize sidebar rendering with callback functions. |
185
+
|`createDocItem`|`function`|`null`| Optional: Returns a `SidebarItemDoc` object, which allows for customisation of sidebar items. For example, add a class name in certain conditions, or add `customProps` to provide custom rendering. See below for a list of supported operations. |
184
186
185
187
> You may optionally configure a `sidebarOptions`. In doing so, an individual `sidebar.js` slice with the configured options will be generated within the respective `outputDir`.
186
188
@@ -206,6 +208,14 @@ The `docusaurus-plugin-openapi-docs` plugin can be configured with the following
206
208
|`createTagPageMD`|`function`|`null`|_Optional:_ Returns a string of the raw markdown body for tag pages.<br/><br/>**Function type:**`(pageData: TagPageMetadata) => string`|
207
209
|`createSchemaPageMD`|`function`|`null`|_Optional:_ Returns a string of the raw markdown body for schema pages.<br/><br/>**Function type:**`(pageData: SchemaPageMetadata) => string`|
208
210
211
+
### sidebarGenerators
212
+
213
+
`sidebarGenerators` can be configured with the following options:
0 commit comments