chore: final build validation and cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { notFound } from 'next/navigation'
|
import { notFound } from 'next/navigation'
|
||||||
import { MDXRemote } from 'next-mdx-remote/rsc'
|
import { MDXRemote } from 'next-mdx-remote/rsc'
|
||||||
import { useMDXComponents } from '@/mdx-components'
|
import { getMDXComponents } from '@/mdx-components'
|
||||||
import remarkMath from 'remark-math'
|
import remarkMath from 'remark-math'
|
||||||
import remarkGfm from 'remark-gfm'
|
import remarkGfm from 'remark-gfm'
|
||||||
import smartypants from 'remark-smartypants'
|
import smartypants from 'remark-smartypants'
|
||||||
@@ -64,7 +64,7 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
|
|||||||
<div className="prose prose-lg max-w-none">
|
<div className="prose prose-lg max-w-none">
|
||||||
<MDXRemote
|
<MDXRemote
|
||||||
source={post.source}
|
source={post.source}
|
||||||
components={useMDXComponents({})}
|
components={getMDXComponents({})}
|
||||||
options={{
|
options={{
|
||||||
mdxOptions: {
|
mdxOptions: {
|
||||||
remarkPlugins: [smartypants, remarkMath, remarkGfm],
|
remarkPlugins: [smartypants, remarkMath, remarkGfm],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { MDXComponents } from 'mdx/types'
|
import type { MDXComponents } from 'mdx/types'
|
||||||
|
|
||||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
export function getMDXComponents(components: MDXComponents): MDXComponents {
|
||||||
return {
|
return {
|
||||||
...components,
|
...components,
|
||||||
// Typography
|
// Typography
|
||||||
|
|||||||
Reference in New Issue
Block a user