Files

source.ts

The source adapter file

What is This?

This file contains code for converting data from content sources to Fumadocs-compatible interface.

lib/source.ts
import { docs, meta } from '@/.source';
import { createMDXSource } from 'fumadocs-mdx';
import { loader } from 'fumadocs-core/source';
 
export const source = loader({
  baseUrl: '/docs',
  source: createMDXSource(docs, meta),
});

The source object provides utilities for docs, see Source API for details of loader function.

Edit on GitHub

Last updated on

On this page