github fuma-nama/fumadocs fumadocs-python@1.0.0

4 hours ago

Runtime content source

createPython() serves the JSON generated by fumapy-generate directly, without generating MDX files:

import { dynamicLoader } from 'fumadocs-core/source';
import { createPython } from 'fumadocs-python';

const python = createPython({
  file: './httpx.json',
});

const pythonLoader = dynamicLoader(python.dynamicSource(), {
  baseUrl: '/docs',
});

Pages are compiled in memory with page.data.load(), render() includes the default MDX components of Fumadocs UI and fumadocs-python/components. Links between modules and classes are resolved from the loader the source is attached to, and loaderPlugin() badges generated pages in the page tree.

convert() shares the same page builder. write() takes the output directory directly, and keeps the package name in file paths:

await write(convert(content, { baseUrl: '/docs' }), 'content/docs');

Don't miss a new fumadocs release

NewReleases is sending notifications on new releases.