We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6fef2f5 + 6ef0aec commit f88fbc5Copy full SHA for f88fbc5
app/utils/documents.server.ts
@@ -56,14 +56,14 @@ export async function fetchRepoFile(
56
}
57
58
export async function markdownToMdx(content: string) {
59
- const { default: rehypeSlug } =
+ const [{ default: rehypeSlug }, { default: remarkGfm }] =
60
// @ts-ignore
61
- await import('rehype-slug')
+ await Promise.all([import('rehype-slug'), import('remark-gfm')])
62
63
const mdx = await bundleMDX<{ title: string }>({
64
source: content,
65
mdxOptions: (options) => {
66
- // options.remarkPlugins = [...(options.remarkPlugins ?? []), rehypeSlug]
+ options.remarkPlugins = [...(options.remarkPlugins ?? []), remarkGfm]
67
options.rehypePlugins = [...(options.rehypePlugins ?? []), rehypeSlug]
68
return options
69
},
0 commit comments