-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
50 lines (47 loc) · 1.37 KB
/
next.config.ts
File metadata and controls
50 lines (47 loc) · 1.37 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
import type { NextConfig } from "next";
import { createMDX } from "fumadocs-mdx/next";
import createNextIntlPlugin from "next-intl/plugin";
const nextConfig: NextConfig = {
typescript: {
ignoreBuildErrors: true,
},
async redirects() {
return [
{ source: "/docs", destination: "/docs/overview", permanent: false },
{ source: "/zh/docs", destination: "/zh/docs/overview", permanent: false },
{ source: "/apis", destination: "/llms", permanent: true },
{ source: "/apis/models/:id*", destination: "/llms/:id*", permanent: true },
{
source: "/docs/overview/privacy-policy",
destination: "/legal/privacy",
permanent: true,
},
{
source: "/zh/docs/overview/privacy-policy",
destination: "/zh/legal/privacy",
permanent: true,
},
{
source: "/docs/overview/terms-of-service",
destination: "/legal/terms",
permanent: true,
},
{
source: "/zh/docs/overview/terms-of-service",
destination: "/zh/legal/terms",
permanent: true,
},
];
},
async rewrites() {
return [
{
source: "/docs/:path*.mdx",
destination: "/api/docs/llms-mdx/:path*",
},
];
},
};
const withMDX = createMDX();
const withNextIntl = createNextIntlPlugin("./i18n/request.ts");
export default withNextIntl(withMDX(nextConfig));