Skip to content

Assembling Fumadocs version 13 #452

Closed Answered by pomber
donghhan asked this question in Q&A
Discussion options

You must be logged in to vote

look that fumadocs changed how to set up mdx in the latest release

you now have to

  • define the remark plugins in source.config.ts (instead of next.config.mjs)
  • pass the custom components in your page (app/docs/[[slug]]/page.tsx), not sure why mdx-components.tsx is ignored
// source.config.ts
import { defineDocs, defineConfig } from "fumadocs-mdx/config";
import { remarkCodeHike, recmaCodeHike } from "codehike/mdx";

export const { docs, meta } = defineDocs();

/** @type {import('codehike/mdx').CodeHikeConfig} */
const chConfig = {
  components: { code: "Code" },
};

export default defineConfig({
  mdxOptions: {
    remarkPlugins: [[remarkCodeHike, chConfig]],
    recmaPlugins: [[recmaCode…

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by donghhan
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@pomber
Comment options

@donghhan
Comment options

@pomber
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants