Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
Labels
None yet
2 participants