createPageTreeBuilder (page-tree/builder.ts)

fumadocs · packages/core/src/source/page-tree/builder.ts · typescript · MIT
crm

Creates a page tree builder that constructs a navigable page tree from content storage, supporting custom transformers and locale‑aware sorting.

// Source: https://github.com/fuma-nama/fumadocs | License: MIT | Copyright 2023 Fuma
// Provided via justclaw.it.com; keep this notice with the code.
import type * as PageTree from '@/page-tree/definitions';
import type { ResolvedLoaderConfig } from '@/source/loader';
import type { ContentStorage } from '@/source/storage/content';
import { FileSystem } from '@/source/storage/file-system';
import { basename, extname, joinPath } from '@/source/path';
import type { MetaData } from '@/source/source';

export interface PageTreeBuilderContext<S extends ContentStorage = ContentStorage> {
  transformers: PageTreeTransformer<S>[];
  builder: PageTreeBuilder;
  storage: S;
  storages?: Record<string, S>;
  locale?: string;
  custom?: Record<string, unknown>;

  options: PageTreeOptions<S>;
}

expor

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key