fumadocs-core 11.0.0
Major Changes
-
2d8df75: Remove
cwdoption fromremark-dynamic-contentwhy: Use
cwdfrom vfilemigrate: Pass the
cwdoption from remark instead -
92cb12f: Simplify Source API virtual storage.
why: Improve performance
migrate:
- storage.write('path.mdx', { type: 'page', ... }) - storage.readPage('page') + storage.write('path.mdx', 'page', { ... }) + storage.read('page', 'page')Transformers can now access file loader options.
load({ transformers: [ ({ storage, options }) => { options.getUrl(); options.getSlugs(); }, ], }); -
f75287d: Introduce
fumadocs-docgenpackage.Offer a better authoring experience for advanced use cases.
- Move
remark-dynamic-contentandremark-installplugins to the new packagefumadocs-docgen. - Support Typescript generator by default
Usage
Add the
remarkDocGenplugin to your remark plugins.import { remarkDocGen, fileGenerator } from "fumadocs-docgen"; remark().use(remarkDocGen, { generators: [fileGenerator()] });Generate docs with code blocks.
```json doc-gen:<generator> { // options } ```Migrate
For
remarkDynamicContent, enablefileGeneratorand use this syntax:```json doc-gen:file { "file": "./path/to/my-file.txt" } ```For
remarkInstall, it remains the same:import { remarkInstall } from "fumadocs-docgen"; - Move
-
2d8df75: Remove support for
getTableOfContentsFromPortableTextwhy: Sanity integration should be provided by 3rd party integrations
migrate: Use built-in sources, or write a custom implementation