-
Notifications
You must be signed in to change notification settings - Fork 6
/
next.config.mjs
35 lines (32 loc) · 936 Bytes
/
next.config.mjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import addMDX from "@next/mdx";
import addBundleAnalyzer from "@next/bundle-analyzer";
import rehypeSlug from "rehype-slug";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypePrettyCode from "rehype-pretty-code";
import rehypeTableOfContents from "rehype-toc";
import remarkSmartyPants from "remark-smartypants";
/** @type {import("next").NextConfig} */
const nextConfig = {};
/** @type {import("rehype-pretty-code").Options} */
const prettyCodeOptions = {
keepBackground: false,
theme: {
dark: "github-dark-dimmed",
light: "github-light",
},
};
export default addBundleAnalyzer({
enabled: process.env.ANALYZE === "true",
})(
addMDX({
options: {
remarkPlugins: [[remarkSmartyPants]],
rehypePlugins: [
[rehypeSlug],
[rehypeAutolinkHeadings],
[rehypeTableOfContents],
[rehypePrettyCode, prettyCodeOptions],
],
},
})(nextConfig)
);