-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathnext.config.mjs
More file actions
43 lines (38 loc) · 1.21 KB
/
next.config.mjs
File metadata and controls
43 lines (38 loc) · 1.21 KB
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
36
37
38
39
40
41
42
43
import createMDX from '@next/mdx'
import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
import rehypeStringify from "rehype-stringify";
import remarkMdxImages from 'remark-mdx-images'
import remarkGfm from 'remark-gfm'
import rehypeUnwrapImages from 'rehype-unwrap-images'
import rehypePrettyCode from "rehype-pretty-code";
/** @type {import('next').NextConfig} */
const nextConfig = {
output: "export",
images: {
unoptimized: true,
formats: ["image/avif", "image/webp"],
remotePatterns: [
{
protocol: "https",
hostname: "**",
},
],
},
// Configure `pageExtensions` to include MDX files
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
// Optionally, add any other Next.js config below
}
/** @type {import('rehype-pretty-code').Options} */
const code_options = {
theme: "github-dark-dimmed",
keepBackground: true
};
const withMDX = createMDX({
// Add markdown plugins here, as desired
options: {
remarkPlugins: [remarkGfm, remarkMath, remarkMdxImages],
rehypePlugins: [rehypeKatex, [rehypePrettyCode, code_options]],
},
})
export default withMDX(nextConfig)