/** * Custom MDX Components * * Styled components for rendering MDX content */ import Image from 'next/image' import Link from 'next/link' import type { MDXComponents } from 'mdx/types' export const mdxComponents: MDXComponents = { // Headings with anchor links h1: ({ children, ...props }) => (

{children}

), h2: ({ children, ...props }) => (

{children}

), h3: ({ children, ...props }) => (

{children}

), h4: ({ children, ...props }) => (

{children}

), // Paragraphs p: ({ children, ...props }) => (
{children}
), // Lists ul: ({ children, ...props }) => ( ), ol: ({ children, ...props }) => (
    {children}
), li: ({ children, ...props }) => (
  • {children}
  • ), // Links a: ({ href, children, ...props }) => ( {children} ), // Images img: ({ src, alt, ...props }) => { if (!src) return null return (
    {alt
    {alt && (
    {alt}
    )}
    ) }, // Code blocks pre: ({ children, ...props }) => (
          {children}
        
    ), code: ({ children, ...props }) => ( {children} ), // Blockquote blockquote: ({ children, ...props }) => (
    {children}
    ), // Horizontal rule hr: (props) => (
    ), // Table table: ({ children, ...props }) => (
    {children}
    ), th: ({ children, ...props }) => ( {children} ), td: ({ children, ...props }) => ( {children} ), // Strong/Bold strong: ({ children, ...props }) => ( {children} ), // Emphasis/Italic em: ({ children, ...props }) => ( {children} ), }