跳至正文
Wener Notes

fumadocs

约 1 分钟阅读
    • MIT, TS
    • 支持 NextJS, Vite, React Router, Tanstack Router
    • 提供 OpenAPI
bash
# Generate src/.source from source.config.ts
npx fumadocs-mdx source.config.ts src/.source

Notes

  • Source -> File -> Page
    • Virtual files -> Virtual Storage -> Transformers -> Result
    • format = meta/page
  • fumadocs-mdx
    • 支持 next 和 vite
    • source.config.ts
      • 定义 collections
        • DocCollection | MetaCollection | DocsCollection
      • 定义 MDX options
    • Loader fumadocs-mdx/loader-mdx
    • docs = meta + doc
  • @content-collections/mdx
TypeScript
interface RuntimeFile {
  info: FileInfo;
  data: Record<string, unknown>;
}
interface AsyncRuntimeFile {
  info: FileInfo;
  data: Record<string, unknown>;
  content: {
    matter: string;
    body: string;
  };
  lastModified?: Date;
}

FAQ

[Remark Image] Failed obtain image size for svg

关联信息

反向链接、本文链接的其他页面和外部资料。

参考资料

GitHub2 条
最近更新commit fc28155编辑