Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
308 changes: 308 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"react-syntax-highlighter": "^15.5.0",
"rehype-katex": "^7.0.1",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"swr": "^2.2.5"
},
Expand Down
3 changes: 2 additions & 1 deletion src/pages/blog/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { ArrowBackIcon } from '@chakra-ui/icons'

import { MDXRemote } from 'next-mdx-remote'
import { serialize } from 'next-mdx-remote/serialize'
import remarkGfm from 'remark-gfm'
import rehypeSlug from 'rehype-slug'
import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
Expand Down Expand Up @@ -125,7 +126,7 @@ export async function getStaticProps({ params }) {
const { content, data } = matter(source)
const mdxSource = await serialize(content, {
mdxOptions: {
remarkPlugins: [remarkMath],
remarkPlugins: [remarkGfm, remarkMath],
rehypePlugins: [rehypeSlug, rehypeKatex],
format: 'mdx',
},
Expand Down
Loading