Skip to content

Commit 69d1f75

Browse files
Blog support for GFM, and update event schedule to table (#206)
Co-authored-by: Erik van Sebille <erikvansebille@gmail.com>
1 parent 0e378ed commit 69d1f75

File tree

4 files changed

+367
-52
lines changed

4 files changed

+367
-52
lines changed

package-lock.json

Lines changed: 308 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"react-syntax-highlighter": "^15.5.0",
4747
"rehype-katex": "^7.0.1",
4848
"rehype-slug": "^6.0.0",
49+
"remark-gfm": "^4.0.1",
4950
"remark-math": "^6.0.0",
5051
"swr": "^2.2.5"
5152
},

src/pages/blog/[id].js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { ArrowBackIcon } from '@chakra-ui/icons'
1717

1818
import { MDXRemote } from 'next-mdx-remote'
1919
import { serialize } from 'next-mdx-remote/serialize'
20+
import remarkGfm from 'remark-gfm'
2021
import rehypeSlug from 'rehype-slug'
2122
import remarkMath from 'remark-math'
2223
import rehypeKatex from 'rehype-katex'
@@ -125,7 +126,7 @@ export async function getStaticProps({ params }) {
125126
const { content, data } = matter(source)
126127
const mdxSource = await serialize(content, {
127128
mdxOptions: {
128-
remarkPlugins: [remarkMath],
129+
remarkPlugins: [remarkGfm, remarkMath],
129130
rehypePlugins: [rehypeSlug, rehypeKatex],
130131
format: 'mdx',
131132
},

0 commit comments

Comments
 (0)