Migrate from Mintlify
Run your Mintlify docs on Fumapress, using your docs.json.
@fumapress/mintlify reads your docs.json and configures the navigation, theme, navbar and more from it. It covers docs.json only. Your content source handles the MDX, including Mintlify components like <Card> and <Accordion>.
Setup
Install
npm i @fumapress/mintlifyMove Your Files
Keep docs.json at your project root, and move your MDX pages to content/docs. Paths in docs.json are resolved against that folder, and a docs/ or content/docs/ prefix in navigation entries is ignored.
Add the Plugin
import { getCollection } from "astro:content";
import { toFumadocsSource } from "@fumadocs/astro/source";
import { createPress } from "@fumapress/astro/config";
import { mintlifyPlugin } from "@fumapress/mintlify";
export default createPress({
docs: toFumadocsSource(await getCollection("docs"), await getCollection("meta")),
})
.plugins(mintlifyPlugin());Your ui.layoutProps and ui.providerProps take priority over docs.json.
Customization
Feature Toggles
Everything is on by default. Turn off a feature to configure it yourself. This example turns off search:
mintlifyPlugin({
// relative to the project root
path: "docs.json",
// the docs folder inside `content/`
docsDir: "docs",
features: {
navigation: true,
navbar: true,
theme: true,
appearance: true,
banner: true,
footer: true,
redirects: true,
notFound: true,
search: false,
metadata: true,
},
});404 Page
errors.404 creates a page with the type mintlify.404. Restyle it in renderPage:
createPress(content)
.plugins(mintlifyPlugin())
.config({
ui: {
renderPage(props) {
if (props.type === "mintlify.404") return <main>{props.title}</main>;
return props.renderDefault();
},
},
});Languages
When docs.json defines navigation.languages, create the i18n config from it:
import { defineMintlifyI18n, mintlifyPlugin, readMintlifyDocs } from "@fumapress/mintlify";
const mintlifyDocs = readMintlifyDocs();
const i18n = defineMintlifyI18n(mintlifyDocs, {
// optionally map Mintlify locales to your own codes
localeMap: { cn: "zh" },
});
export default createPress(content, { i18n })
.plugins(mintlifyPlugin())
.config({
ui: { translations: i18n.translations() },
});API Pages
Forward api.openapi sources (file paths or URLs) to the OpenAPI plugin:
import { mintlifyPlugin } from "@fumapress/mintlify";
import { createMintlifyOpenAPI } from "@fumapress/mintlify/openapi";
import openapiPlugin from "fumadocs-openapi/press";
const openapi = createMintlifyOpenAPI();
export default createPress({
docs: docsSource,
openapi: await openapi.staticSource(),
}).plugins(mintlifyPlugin(), openapiPlugin({ server: openapi }));api.asyncapi works the same way, with createMintlifyAsyncAPI from @fumapress/mintlify/asyncapi and the AsyncAPI plugin.
api.playground.proxy turns the proxy on or off. It is on by default, so the site needs a server. Set it to false on a static site.
docs.json Support
Unsupported properties are accepted and ignored, so they never stop the migration. docs.json can reference other JSON files with $ref, as long as they stay inside your project root.
name: Navbar title, when no logo is set.description:<meta name="description">on every page.colors.primary/colors.light:--color-fd-primaryin light and dark mode, with a computed foreground color.logo: Single or light/dark image, optionalhref.favicon: Single or light/dark icon.navigation:pages,groups,tabs,anchors,dropdowns,products,menu,versions,languagesandglobal, in the sidebar. Also per-itemicon,tag,hidden,root,expandedand externalhrefs.navbar: Links with labels or icons, GitHub and Discord icons, and theprimarybutton. They come after the links ofui.layoutProps.appearance:defaultcolor scheme.stricthides the theme toggle, and forces the default scheme when it is explicit.background.color/background.image: Applied with CSS, with light and dark variants.fonts: Google Fonts, self-hostedwoff/woff2, and separateheadingandbodyfonts.banner: Inline Markdown,dismissible,typeand customcolor.footer: Social links and up to 4 link columns.redirects: Exact paths plus:paramand:param*patterns.permanentmaps to 308 or 307. Redirects run on a server, so a static site needs them in the config of its host.errors.404: Redirects home by default, or a 404 page with customtitleanddescriptionwithredirect: false.seo.metatags: Added to every page.og:*keys render asproperty.seo.indexing: Withnavigable(default), pages not in the navigation getnoindex.search.prompt: The placeholder of the search UI.metadata.timestamp: Last modified dates are hidden unless it istrue.api.openapi/api.asyncapi: WithcreateMintlifyOpenAPI()andcreateMintlifyAsyncAPI().api.playground.proxy: Turns the API proxy on or off.
icons.library: All icons render with Lucide. Lucide names map 1:1. Font Awesome and Tabler names are matched on a best-effort basis. Unknown names are skipped with a warning.colors.dark: No separate button or hover color.primaryandlightset the theme colors.integrations: Script-based analytics go into<head>:amplitude,clarity,fathom,ga4,gtm,heap,hotjar,intercom,koala,logrocket,mixpanel,pirsch,plausible,posthog,segment. Others aren't supported.contextual: Pages show actions to copy Markdown and open AI tools. Theoptionslist anddisplayposition can't be configured.footer.socials: Icons for all platforms Mintlify accepts.website,earth-americasandpodcastuse generic icons.
theme: Customize with UI options.background.decoration: Add your own insrc/app.css.styling.eyebrows: Pages show breadcrumbs by default.styling.codeblocks: Configure Shiki themes in your MDX options.thumbnails: Open Graph Images generates them.interaction.drilldown: Sidebar folder behavior can't be configured.variables: Templating is up to your content source.markdown.schema/markdown.instructions: See llms.txt.api.params/api.examples/api.url/api.mdx/api.playground.display/api.playground.credentials: Fumadocs OpenAPI has no equivalent.navigationextras:directory,align,searchable,public,boost,color,hiddenlanguages/versionshref: Fumapress has no equivalent.$schema,public: They are hosting options, so they don't apply.
Last updated on