-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathnext.config.mjs
More file actions
50 lines (45 loc) · 1.12 KB
/
next.config.mjs
File metadata and controls
50 lines (45 loc) · 1.12 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
/** @type {import('next').NextConfig} */
import createMDX from "@next/mdx";
import rehypeUnwrapImages from 'rehype-unwrap-images'
import remarkFrontmatter from 'remark-frontmatter'
import remarkGfm from 'remark-gfm'
const nextConfig = {
pageExtensions: ['js', 'jsx', 'md', 'mdx', 'ts', 'tsx'],
async redirects() {
return [
{
source: '/docs/getting-started/configuring-providers',
destination: '/docs/kagent/supported-providers',
permanent: true,
},
{
source: '/docs/kagent/getting-started/tracing',
destination: '/docs/kagent/observability/tracing',
permanent: true,
},
];
},
webpack: (config) => {
config.module.rules.push({
test: /\.ya?ml$/,
use: 'yaml-loader',
});
return config;
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'img.youtube.com',
},
],
},
};
const withMDX = createMDX({
options: {
remarkPlugins: [remarkFrontmatter, remarkGfm],
rehypePlugins: [rehypeUnwrapImages],
},
})
// Merge MDX config with Next.js config
export default withMDX(nextConfig)