|
import rehypePrism from "@mapbox/rehype-prism"; |
|
1 |
import createMDX from "@next/mdx"; |
import createMDX from "@next/mdx"; |
2 |
import rehypeAutolinkHeadings from "rehype-autolink-headings"; |
import rehypeAutolinkHeadings from "rehype-autolink-headings"; |
3 |
|
import rehypePrettyCode from "rehype-pretty-code"; |
4 |
import rehypeSlug from "rehype-slug"; |
import rehypeSlug from "rehype-slug"; |
5 |
import remarkFrontmatter from "remark-frontmatter"; |
import remarkFrontmatter from "remark-frontmatter"; |
6 |
import remarkGfm from "remark-gfm"; |
import remarkGfm from "remark-gfm"; |
14 |
}, |
}, |
15 |
}; |
}; |
16 |
|
|
17 |
|
/** @type {import('rehype-pretty-code').Options} */ |
18 |
|
const rehypePrettyCodeOptions = { |
19 |
|
theme: "material-theme-ocean", |
20 |
|
}; |
21 |
|
|
22 |
const withMDX = createMDX({ |
const withMDX = createMDX({ |
23 |
extension: /\.mdx?$/, |
extension: /\.mdx?$/, |
24 |
options: { |
options: { |
36 |
properties: { className: "autolink", tabindex: -1 }, |
properties: { className: "autolink", tabindex: -1 }, |
37 |
}, |
}, |
38 |
], |
], |
39 |
rehypePrism, |
[rehypePrettyCode, rehypePrettyCodeOptions], |
40 |
], |
], |
41 |
}, |
}, |
42 |
webpack(config) { |
webpack(config) { |