Fumadocs

什么是Fumadocs

介绍 Fumadocs,一个你可以拆解的文档框架。

Fumadocs 框架指的是 UI + 核心 + 内容源的组合,Fumadocs 更多是一种思维框架,每一层都可以是独立的库。

🌐 The Fumadocs framework refers to a combination of UI + Core + Content Source, Fumadocs is more of a mental framework and each layer can be a library on its own.

哲学

🌐 Philosophy

Fumadocs 的创建旨在提供一种更可定制的文档构建体验,成为一个不带固定规范的文档框架,一个你可以自由打破的“框架”

🌐 Fumadocs was created to bring a more customisable experience for building docs, to be a docs framework that is not opinionated, a "framework" that you can break.

较少抽象

🌐 Less Abstraction

虽然大多数框架都是通过配置文件进行配置的,但当你希望调整其细节时,它们通常缺乏灵活性。你无法控制它们如何渲染页面,也无法控制其内部逻辑。

🌐 While most frameworks are configured with a configuration file, they usually lack flexibility when you hope to tune its details. You can’t control how they render the page nor the internal logic.

Fumadocs 期望你编写代码并与其他软件协作,它向你展示应用的工作方式,并且完全可定制,而不是依赖配置文件。

🌐 Fumadocs expects you to write code and cooperate with the rest of your software, it shows you how the app works and fully customisable, instead of a configuration file.

无缝集成

🌐 Seamless Integration

Fumadocs 与你的 React 框架紧密集成,提供实用的工具和美观的界面。

🌐 Fumadocs integrates tightly with your React framework, bringing useful utilities and a good-looking UI.

对于 Next.js 开发者来说,你仍然在使用 App Router 的功能,比如 静态网站生成。对于 Next.js 开发者来说,没有什么新的,一切对你来说都是熟悉的。

🌐 For Next.js developers, you are still using features of App Router, like Static Site Generation. There is nothing new for Next.js developers, that everything is familiar to you.

可组合界面

🌐 Composable UI

Fumadocs 的 UI(默认主题)唯一提供的就是用户界面。该界面在设计上有自己的观点,以提供更好的移动响应性和用户体验。

🌐 The only thing Fumadocs UI (the default theme) offers is User Interface. The UI is opinionated for bringing better mobile responsiveness and user experience.

相反,我们采用了一种更灵活的方法,灵感来自 Shadcn UI —— Fumadocs CLI,允许你“分叉” Fumadocs UI 的一部分,并进行完全自定义。

🌐 Instead, we follow a much more flexible approach inspired by Shadcn UI — Fumadocs CLI, allowing you to "fork" a part of Fumadocs UI, and fully customise it.

服务器优先方法

🌐 Server-first Approach

传统上,静态网站生成器是静态的

🌐 Traditionally, static site generators are static.

然而,Fumadocs 引入了一种由 React 服务器组件驱动的以服务器为先的方法。拥有完美的服务器-客户端边界,内容变得动态且具有交互性。

🌐 However, Fumadocs introduce a server-first approach powered by React Server Component. With perfect server-client boundary, content becomes dynamic and interactive.

你可以从服务器获取数据以显示内容,或者与接收实时更新的内容管理系统(CMS)集成。它始终是最新的,并且易于维护。

🌐 You can fetch data from server to display content, or integrate with CMS receiving realtime updates. It is always up-to-date and easy to maintain.

极简

🌐 Minimal

Fumadocs 由 Fuma 和众多贡献者维护,注重代码库的可维护性。

🌐 Fumadocs is maintained by Fuma and many contributors, with care on the maintainability of codebase.

虽然我们并不打算提供人们想要的所有功能,但我们更专注于使基本功能完美且维护良好。你也可以通过贡献,让 Fumadocs 变得更有用!

🌐 While we don't aim to offer every functionality people wanted, we're more focused on making basic features perfect and well-maintained. You can also help Fumadocs to be more useful by contributing!

何时使用Fumadocs

🌐 When to use Fumadocs

Fumadocs 设计注重灵活性,不局限于特定用途。

🌐 Fumadocs is designed with flexibility in mind, it is not limited to certain usages.

  • fumadocs-core 是一个无头 UI 库,用于构建文档。
  • fumadocs-mdx 是一个处理 MDX 内容的实用库。

对于大多数网页应用来说,纯 React.js 已经不够用了。如今,我们还希望拥有博客、展示页面、常见问题页面等。在这些情况下,Fumadocs 可以帮助你更轻松地构建文档,减少样板代码。

🌐 For most of the web applications, vanilla React.js is no longer enough. Nowadays, we also wish to have a blog, a showcase page, a FAQ page, etc. In these cases, Fumadocs can help you build the docs easier, with less boilerplate.

如果你感兴趣,可以阅读比较

🌐 You can read Comparisons if you're interested.

文档

🌐 Documentation

Fumadocs 专注于创作体验,它提供漂亮的主题和许多文档自动化工具。

🌐 Fumadocs focuses on authoring experience, it provides a beautiful theme and many docs automation tools.

它可以帮助你更快地迭代代码库,同时不会落下文档。你可以将这个网站作为使用 Fumadocs 构建的文档网站的示例。

🌐 It helps you to iterate your codebase faster while never leaving your docs behind. You can take this site as an example of docs site built with Fumadocs.

博客网站

🌐 Blog sites

大多数 React.js 框架已经能够满足博客网站的需求。

🌐 Most React.js frameworks can already suffice the needs of a blog site.

Fumadocs 提供了额外的工具,包括语法高亮、文档搜索和默认主题(Fumadocs UI)。它帮助你避免重复造轮子。

🌐 Fumadocs provides additional tooling, including syntax highlighting, document search, and a default theme (Fumadocs UI). It helps you to avoid reinventing the wheels.

Last updated on

On this page