-
Hi there, I tried updating the repository https://github.com/sapphiredev/website to typedoc-plugin-markdown v4 + docusaurus-plugin-typedoc v1 but I'm having issues with the markdown that the plugin outputs. When Docusaurus next picks up the markdown, it gives me rendering errors. I have created a branch and draft PR with my changes so far here: sapphiredev/website#256 Keep in mind when cloning this repository you have to add The error I am currently getting:
And another error I get is:
The generated markdown for the first error is: # Class: `abstract` Plugin
## Constructors
### new Plugin()
> **new Plugin**(): [`Plugin`](Plugin.mdx)
#### Returns
[`Plugin`](Plugin.mdx)
## Properties
### [postInitialization]()?
> `static` `optional` **[postInitialization]**: (`this`, `options`) => `void`
#### Parameters
• **this**: [`SapphireClient`](SapphireClient.mdx)\<`boolean`\>
• **options**: [`ClientOptions ↗️`]( https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface )
#### Returns
`void`
#### Source
[projects/framework/src/lib/plugins/Plugin.ts:10](https://github.com/sapphiredev/framework/blob/35b7e1674db4d3430b841494b9066b2f581f4f62/src/lib/plugins/Plugin.ts#L10)
***
### [postLogin]()?
> `static` `optional` **[postLogin]**: (`this`, `options`) => [`Awaitable`](../type-aliases/Awaitable.mdx)\<`void`\>
#### Parameters
• **this**: [`SapphireClient`](SapphireClient.mdx)\<`boolean`\>
• **options**: [`ClientOptions ↗️`]( https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface )
#### Returns
[`Awaitable`](../type-aliases/Awaitable.mdx)\<`void`\>
#### Source
[projects/framework/src/lib/plugins/Plugin.ts:12](https://github.com/sapphiredev/framework/blob/35b7e1674db4d3430b841494b9066b2f581f4f62/src/lib/plugins/Plugin.ts#L12)
***
### [preGenericsInitialization]()?
> `static` `optional` **[preGenericsInitialization]**: (`this`, `options`) => `void`
#### Parameters
• **this**: [`SapphireClient`](SapphireClient.mdx)\<`boolean`\>
• **options**: [`ClientOptions ↗️`]( https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface )
#### Returns
`void`
#### Source
[projects/framework/src/lib/plugins/Plugin.ts:8](https://github.com/sapphiredev/framework/blob/35b7e1674db4d3430b841494b9066b2f581f4f62/src/lib/plugins/Plugin.ts#L8)
***
### [preInitialization]()?
> `static` `optional` **[preInitialization]**: (`this`, `options`) => `void`
#### Parameters
• **this**: [`SapphireClient`](SapphireClient.mdx)\<`boolean`\>
• **options**: [`ClientOptions ↗️`]( https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface )
#### Returns
`void`
#### Source
[projects/framework/src/lib/plugins/Plugin.ts:9](https://github.com/sapphiredev/framework/blob/35b7e1674db4d3430b841494b9066b2f581f4f62/src/lib/plugins/Plugin.ts#L9)
***
### [preLogin]()?
> `static` `optional` **[preLogin]**: (`this`, `options`) => [`Awaitable`](../type-aliases/Awaitable.mdx)\<`void`\>
#### Parameters
• **this**: [`SapphireClient`](SapphireClient.mdx)\<`boolean`\>
• **options**: [`ClientOptions ↗️`]( https://discord.js.org/docs/packages/discord.js/main/ClientOptions:Interface )
#### Returns
[`Awaitable`](../type-aliases/Awaitable.mdx)\<`void`\>
#### Source
[projects/framework/src/lib/plugins/Plugin.ts:11](https://github.com/sapphiredev/framework/blob/35b7e1674db4d3430b841494b9066b2f581f4f62/src/lib/plugins/Plugin.ts#L11)
The markdown outputs headers with import type { Awaitable } from '@sapphire/utilities';
import type { ClientOptions } from 'discord.js';
import type { SapphireClient } from '../SapphireClient';
import { postInitialization, postLogin, preGenericsInitialization, preInitialization, preLogin } from './symbols';
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
export abstract class Plugin {
public static [preGenericsInitialization]?: (this: SapphireClient, options: ClientOptions) => void;
public static [preInitialization]?: (this: SapphireClient, options: ClientOptions) => void;
public static [postInitialization]?: (this: SapphireClient, options: ClientOptions) => void;
public static [preLogin]?: (this: SapphireClient, options: ClientOptions) => Awaitable<void>;
public static [postLogin]?: (this: SapphireClient, options: ClientOptions) => Awaitable<void>;
} All things said, what I'm looking for is support for getting the website to build correctly again but with the updated plugins. I honestly have no idea where to start so I figured I'd start by posting here. If I manually clear the generated
To give an idea, this is how I would expect my sidebar to get rendered: The changes here are:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @favna, Thank you for the feedback. The parsing was due to a bug resolving symbols which is now fixed (typedoc-plugin-markdown@4.0.1). For the sidebar we no longer recommend an autogenerated sidebar configuration (it was brittle and not easy to customize). We now build out a json sidebar. Please update your sidebar file and replace the sidebar with this and it should resolve your issues: |
Beta Was this translation helpful? Give feedback.
-
As code:
|
Beta Was this translation helpful? Give feedback.
Hi @favna,
Thank you for the feedback.
The parsing was due to a bug resolving symbols which is now fixed (typedoc-plugin-markdown@4.0.1).
For the sidebar we no longer recommend an autogenerated sidebar configuration (it was brittle and not easy to customize). We now build out a json sidebar.
Please update your sidebar file and replace the sidebar with this and it should resolve your issues: