Fumadocs

Node.js

Access content in Node.js runtime.

Setup

Make sure to run the script under ESM environment.

scripts/example.js
import { register } from 'node:module';

register('fumadocs-mdx/node/loader', import.meta.url);

// accessing content
const { source } = await import('./lib/source');
console.log(source.getPages());

How is this guide?

Last updated on

On this page