Remark Docs Generation
Useful remark plugins to generate docs automatically
Usage
Add the remark plugin.
Use generators in a markdown/MDX file with:
Generators
You can add a generator to the generators
array.
The package is already bundled with several generators, you can import them from the package directly.
File Generator
It copies the content from a file to the document (mdast tree) and forms a paragraph.
As Code Block
Copy the content into a code block.
Or to specify the programming language and meta string:
Typescript Generator
MDX Only.
Generate docs from real Typescript definitions.
This generator is powered by the fumadocs-typescript
package, which also offers a plenty of features.
It takes the current working directory as root directory, then look for your Typescript configuration file (tsconfig.json
).
You may configure it with generator options.
To use it, specify the Typescript file and exported type you want to generate from.
This will generate a type table:
You can import the component from fumadocs-ui
, or make your own implementation.
The type definition of props can be found at VirtualTypeTableProps
.
Last updated on