-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
58 lines (55 loc) · 1.38 KB
/
next.config.mjs
File metadata and controls
58 lines (55 loc) · 1.38 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import nextMDX from '@next/mdx';
import rehypePrettyCode from 'rehype-pretty-code';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import remarkToc from 'remark-toc';
import remarkFrontmatter from 'remark-frontmatter';
import remarkMdxFrontmatter from 'remark-mdx-frontmatter';
import remarkGfm from 'remark-gfm';
import wikiLinkPlugin from 'remark-wiki-link';
import { transformerNotationDiff, transformerNotationErrorLevel } from '@shikijs/transformers';
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
output: 'export',
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
reactStrictMode: true,
basePath: "/Blog"
}
const withMDX = nextMDX({
extension: /\.mdx?$/,
// Add Markdown plugins here, as desired
options: {
remarkPlugins: [
remarkFrontmatter,
remarkMdxFrontmatter,
remarkToc,
remarkGfm,
[
wikiLinkPlugin,
{
pageResolver: (name) => [name.replace(/ /g, '-').toLowerCase()],
hrefTemplate: (permalink) => `/Blog/${permalink}`,
aliasDivider: '|'
}
]
],
rehypePlugins: [
rehypeSlug,
rehypeAutolinkHeadings,
[
rehypePrettyCode,
{
theme: 'github-dark-default',
transformers: [
transformerNotationDiff(),
transformerNotationErrorLevel()
]
}
]
]
}
})
// Merge MDX config with Next.js config
export default withMDX(nextConfig)