# From Fumadocs

Move a Fumadocs or Fumapress site to Vuesho.

Vuesho ports [Fumapress](https://press.fumadocs.dev) and [Fumadocs UI](https://fumadocs.dev) to Vue, with the same plugin model, markup and Tailwind CSS classes. A Vuesho site depends on neither Fumadocs nor React.

## Concepts [#concepts]

The config follows Fumapress, with Vue in place of React. `vuesho.config.ts` runs only on the server.

`createPress()` becomes `createSite()`, with `.plugins()` and `.config()`:

```ts tab="Fumapress"
import { createPress } from "fumapress";

export default createPress(content)
  .plugins(search(), sitemap())
  .config({ site: { name: "My Docs" } });
```

```ts tab="Vuesho"
import { createSite, recommendedPreset } from "vuesho/config";
import { defineDocs } from "vuesho/content";

const docs = defineDocs();

export default createSite(docs.toSource())
  .plugins(recommendedPreset())
  .config({ site: { name: "My Docs" } });
```

The page rendering that `ui.renderPage` and `props.renderDefault()` set up is now a [layout](/layouts) in `src/theme.ts`:

```tsx tab="Fumapress" title="press.config.tsx"
app.config({
  ui: {
    renderPage(props) {
      return props.renderDefault({ layout: "notebook" });
    },
  },
});
```

```ts tab="Vuesho" title="src/theme.ts"
import { defineTheme } from "vuesho/theme";
import defaultTheme from "vuesho/theme/default";
import NotebookLayout from "vuesho/layouts/notebook";

export default defineTheme({
  extends: defaultTheme,
  layouts: { default: NotebookLayout },
});
```

The default theme is opt-in with `extends: defaultTheme`, not always active. Without it, the site has no layouts.

A plugin's `slots` hook returns slot items as an array of objects. In Vuesho, a plugin's components go in its [theme module](/plugin-api#theme-module) instead:

```tsx tab="Fumapress"
// Plugin hook:
slots({ page }) {
  if (!page) return;
  return [
    { name: "acme:share", region: "actions", component: ShareButton },
  ];
}
```

```ts tab="Vuesho plugin"
// Plugin property:
{ name: "acme:share", theme: "acme-share/theme" }
```

```ts tab="Vuesho theme module" title="acme-share/theme.ts"
import { defineAsyncComponent } from "vue";
import type { PluginTheme } from "vuesho/client";

export default {
  slots: { actions: defineAsyncComponent(() => import("./ShareButton.vue")) },
} satisfies PluginTheme;
```

Custom pages are Vue components in `src/pages/`, with [`definePage()`](/custom-pages) instead of `getConfig()`:

```tsx tab="Fumapress" title="src/pages/about.tsx"
import type { WakuRouteConfig } from "fumapress";

export function getConfig() {
  return { data: { title: "About" } } satisfies WakuRouteConfig;
}

export default function About() {
  return <h1>About</h1>;
}
```

```vue tab="Vuesho" title="src/pages/about.vue"
<script setup>
import { definePage } from "vuesho/client";

definePage({ data: { title: "About" } });
</script>

<template>
  <h1>About</h1>
</template>
```

## From MDX to Markdown [#from-mdx-to-markdown]

Rename a page from `.mdx` to `.md`, and turn its JSX into Vue's template syntax:

```md tab="Fumadocs (MDX)"
---
title: Installation
---

import { Rocket } from "lucide-react";

export const version = "24";

{/* The minimum version */}
<Callout title={`Node.js ${version}`}>Install Node.js first.</Callout>

<Card title="Quick Start" href="/quick-start" icon={<Rocket />} />
```

```md tab="Vuesho (Markdown + Vue)"
---
title: Installation
---

<!-- The minimum version -->

<Callout :title="`Node.js ${version}`">Install Node.js first.</Callout>

<Card title="Quick Start" href="/quick-start">
  <template #icon><Rocket /></template>
</Card>

<script setup>
import { Rocket } from "@lucide/vue";

const version = "24";
</script>
```

### Other Syntax [#other-syntax]

Directives and GitHub alerts render as callouts with [`admonitionsPlugin()`](/markdown/components#containers-and-alerts), so they need no conversion.

JSX conditions and lists become `v-if` and `v-for`:

```md tab="Fumadocs"
### 1. Install

<show when={props.framework === "astro"}>
Add the adapter.
</show>

<Card {...card} />

<ul>
  {items.map((item) => (
    <li key={item}>{item}</li>
  ))}
</ul>
```

```md tab="Vuesho"
### Install [step]

<template v-if="framework === 'astro'">
Add the adapter.
</template>

<Card v-bind="card" />

<ul>
  <li v-for="item in items" :key="item">{{ item }}</li>
</ul>

<script setup lang="ts">
const items = ["npm", "pnpm"];
</script>
```

- The components of `mdx-components.tsx` are `.vue` files in [`src/components/content/`](/markdown/components#custom-components), and a page uses each by its file name.
- `framework` is a [path param](/routing#path-params).
- `[step]` needs [`stepsPlugin()`](/markdown/components#steps).
- Emphasis that ends on CJK punctuation needs [`markdown-it-cjk-friendly`](/markdown#markdown-it-plugins).

### Collections [#collections]

Collections have different defaults from `fumadocs-mdx`:

- `defineDocs()` reads `content/`, not `content/docs/`. Pass `{ dir: "content/docs" }` to keep the old folder.
- The compiler options are [`markdown`](/markdown/collections), not `mdxOptions` or `satteriOptions`.
- `draft: true` in the frontmatter leaves a page out of the build, but keeps it in `vuesho dev`.

## Packages [#packages]

Vuesho is one framework. Install `vuesho` in place of `fumadocs-mdx`, `fumadocs-ui`, `fumadocs-core` and `@fumadocs/tailwind`:

```json tab="Fumadocs"
{
  "fumadocs-mdx": "...",
  "fumadocs-ui": "...",
  "fumadocs-core": "...",
  "@fumadocs/tailwind": "..."
}
```

```json tab="Vuesho"
{
  "vuesho": "..."
}
```

It includes [collections](/markdown/collections), [Markdown](/markdown) with image sizing, the [UI](/theme#ui-components) with color presets, [search](/search), [i18n](/i18n) with [language packs](/i18n#language-packs), and [code highlighting](/markdown/code-blocks). The [source plugin system](/content-sources) replaces `fumadocs-core/source`, with `lucideIconsPlugin()` and `statusBadgesPlugin()`. `fumadocs-core/highlight` is `vuesho/highlight`, and the link, TOC and breadcrumb components are in `vuesho/client` and `vuesho/ui`. `fumadocs-docgen` becomes `npm` code blocks, `<include>`, `v-if` and `ts2jsPlugin()`. `@fumadocs/mdx-remote` becomes [dynamic sources](/dynamic-rendering).

### Integrations [#integrations]

Each integration renames from `@fumadocs/*` or `@fumapress/*` to `@vuesho/*`:

| Fumadocs                                                      | Vuesho                                                                              |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `fumadocs-openapi`, `@fumadocs/openapi-standalone`            | [`@vuesho/openapi`](/api-docs/openapi)                                              |
| `@fumadocs/asyncapi`, `@fumadocs/graphql`                     | `@vuesho/asyncapi`, `@vuesho/graphql`                                               |
| `@fumadocs/json-schema`, `@fumari/stf`                        | `@vuesho/api-docs/json-schema`, `@vuesho/stf`                                       |
| `fumadocs-typescript`, `fumadocs-python`                      | [`@vuesho/typescript`](/markdown/type-tables), [`@vuesho/python`](/api-docs/python) |
| `fumadocs-twoslash`, `@fumadocs/story`                        | [`@vuesho/twoslash`](/markdown/twoslash), [`@vuesho/story`](/markdown/stories)      |
| `@fumadocs/notion`, `@fumadocs/sanity`, `fumadocs-obsidian`   | [`@vuesho/notion`](/content-sources/notion), `@vuesho/sanity`, `@vuesho/obsidian`   |
| `@fumadocs/basehub`                                           | [BaseHub source](/content-sources/basehub)                                          |
| `@fumadocs/local-content`, `@fumadocs/local-html`             | [`@vuesho/local-content`](/content-sources/local-files), `@vuesho/local-html`       |
| `@fumapress/blog`, `@fumadocs/changelog`, `@fumapress/tegami` | [`@vuesho/blog`](/plugins/blog), [`@vuesho/changelog`](/plugins/changelog)          |
| `@fumadocs/ai-chat`, `@fumapress/ai`, `fumadocs-core/mcp`     | [`@vuesho/ai`](/ai)                                                                 |
| `@fumapress/feedback`, `fumadocs-epub`, `@fumapress/mintlify` | [`@vuesho/feedback`](/plugins/feedback), `@vuesho/epub`, `@vuesho/mintlify`         |
| `create-fumadocs-app`, `create-fumapress`, `fumadocs-preview` | `create-vuesho`, `vuesho dev`                                                       |

## Fumadocs CLI [#fumadocs-cli]

`fumadocs init` becomes `npm create vuesho` inside an existing project. `fumadocs add` and `fumadocs customize` become [`vuesho add`](/cli#vuesho-add), with the `shadcn` color preset. A `fumadocs feature` is now the feature's plugin in `vuesho.config.ts`, or a `create-vuesho` flag. `fumadocs tree` becomes `<auto-files>` with `filesPlugin()`.

## Fumapress Plugins [#fumapress-plugins]

A `@fumapress/core` plugin that runs only on the server keeps most of its code, since the startup, content, route, page and `build` hooks have the same names. These parts differ:

- **The loader:** use the [loader hooks](/content-hooks#loader-hooks)
  `transformStorage` and `transformPageTree`, instead of loader plugins from `configureLoader`.
- **`layoutProps`:** receives the language, not the page.
- **The UI hooks `getPageView`, `slots` and `providerProps`:** a view returns props instead of React elements, and the plugin's components go in its [theme module](/plugin-api#theme-module).
- **`getPageBody`** returns a module, `{ html }` or a view, instead of a React node.
- **`createView`** calls `view({ params, lang, request })`, instead of `view(params, { lang })`.
- **The `build` hook** has no `fetch` in its output: read the built files from `files`.
- **`staticPaths`** is `staticParams`, as in content. Each entry is an object of values by param name, like `{ slug: "a" }`, not a list of params in order.

A Vuesho plugin can also add [data routes](/routes#data-routes), [Markdown syntax](/markdown-extensions) and [Nitro options](/plugin-api#nitro-options).

## Not Ported [#not-ported]

- `@fumadocs/astro` and `@fumapress/astro`: Vuesho is the framework, so it needs no adapter.
- `@fumadocs/shadcn`: not ported yet.
- Editor Studio: it edits MDX, and can't read Vue's template syntax.
- The Google Drive source: Fumadocs never published it.
- Trieve search: the service [shut down](https://web.archive.org/web/20251009211651/https://www.trieve.ai/blog/trieve-is-being-acquired-by-mintlify) in November 2025.
- A language after the first URL segment: the language is always the first segment, while a [base path](/deploying#base-path) prefixes the whole site.
