import Image from 'next/image' import Link from 'next/link' import { cookies } from 'next/headers' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faLink } from '@fortawesome/free-solid-svg-icons' import { MDXRemote } from 'next-mdx-remote/rsc' import { nodeTypes } from '@mdx-js/mdx' import rehypeRaw from 'rehype-raw' import remarkGfm from 'remark-gfm' import rehypeSlug from 'rehype-slug' import remarkMath from 'remark-math' import rehypeKatex from 'rehype-katex' import { getHighlighter } from 'shiki' import 'katex/dist/katex.min.css' import { getTheme } from '@/theme/theme.server' import { remarkSyntaxHighlightingPlugin } from '@/blog/remarkSyntaxHighlightingPlugin' import { BlogPostComments } from '@/blog/BlogPostComments' const Heading = ( props: React.DetailedHTMLProps< React.HTMLAttributes, HTMLHeadingElement > ): JSX.Element => { const { children, id = '' } = props return (

{children}

) } export interface BlogPostContentProps { content: string } export const BlogPostContent = async ( props: BlogPostContentProps ): Promise => { const { content } = props const cookiesStore = cookies() const theme = getTheme() const highlighter = await getHighlighter({ theme: `${theme}-plus` }) return (
{ const { src = '', alt = 'Blog Image' } = properties const source = src.replace('../../public/', '/') return ( {alt} ) }, a: (props) => { const { href = '' } = props if (href.startsWith('#')) { return } return } }} />
) }