fuma-nama / fumadocs

The beautiful docs framework with Next.js. Alternative to Nextra
https://fumadocs.vercel.app
MIT License
1.86k stars 113 forks source link

Allow MDX in Page Description #971

Closed SaadBazaz closed 3 weeks ago

SaadBazaz commented 3 weeks ago

To Reproduce

  1. Make an MDX page.
  2. Add a title i.e.
    ---
    title: Create an Upstreet.ai Agent
    description: Upstreet.ai Agents are autonomous digital beings which you can customize to your content. Read more about the [concept behind agents](/docs/learn).
    full: false
    ---
    1. Run the dev server
    2. Go to the page

Current vs. Expected behavior

Currently the markdown renders as-is.

I expect it to render the anchor tag.

Screenshot 2024-10-24 at 02 32 47

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 21.1.0
  npm: 10.2.0
  Yarn: 1.22.19
  pnpm: 9.5.0
Relevant Packages:
  next: 15.0.0 // There is a newer version (15.0.1) available, upgrade recommended! 
  eslint-config-next: 14.0.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.6.3
Next.js Config:
  output: N/A
 ⚠ There is a newer version (15.0.1) available, upgrade recommended! 
   Please try the latest canary version (`npm install next@canary`) to confirm the issue still exists before creating a new issue.
   Read more - https://nextjs.org/docs/messages/opening-an-issue

Which area(s) are affected? (Select all that apply)

Not sure

Additional context

No response

fuma-nama commented 3 weeks ago

Instead of description frontmatter, you can use MDX content instead. The frontmatter is for Metadata API, hence MDX isn't expected

SaadBazaz commented 3 weeks ago

@fuma-nama - I'd like to have links in the description as well. Is there a way to use the frontmatter in Metadata API but "hide" it on the actual page?

fuma-nama commented 3 weeks ago

Fumadocs UI is just essentially an UI library, you can remove the DocsDescription component in your page.tsx