feat: add remark-smartypants for typographic improvements

This commit is contained in:
2026-06-01 21:28:25 -05:00
parent 34525ffd83
commit 0d44f5be6e
3 changed files with 41 additions and 3 deletions

View File

@@ -3,9 +3,12 @@ import { MDXRemote } from 'next-mdx-remote/rsc'
import { useMDXComponents } from '@/mdx-components'
import remarkMath from 'remark-math'
import remarkGfm from 'remark-gfm'
import smartypants from 'remark-smartypants'
import rehypePrettyCode from 'rehype-pretty-code'
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
import rehypeKatex from 'rehype-katex'
import rehypeSlug from 'rehype-slug'
import rehypeExternalLinks from 'rehype-external-links'
import { getPosts, getPost } from '@/lib/posts'
import { TableOfContents } from '@/components/blog/TableOfContents'
import { ScrollToTop } from '@/components/ui/ScrollToTop'
@@ -54,9 +57,10 @@ export default async function PostPage({ params }: { params: Promise<{ slug: str
components={useMDXComponents({})}
options={{
mdxOptions: {
remarkPlugins: [remarkMath, remarkGfm],
rehypePlugins: [
remarkPlugins: [smartypants, remarkMath, remarkGfm],
rehypePlugins: [
rehypeSlug,
rehypeAutolinkHeadings,
[rehypePrettyCode, { theme: 'github-dark' }],
rehypeKatex,
],