-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
78 lines (73 loc) 路 1.54 KB
/
next.config.js
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// @ts-check
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
redirects: async () => [
// `zebrastik.com` to `zebrastik`
{
destination: '/zebrastik',
has: [{ type: 'host', value: 'zebrastik.com' }],
permanent: true,
source: '/',
},
{
destination: '/zebrastik',
has: [{ type: 'host', value: 'zbrstk.com' }],
permanent: true,
source: '/',
},
// deleted pages
{
destination: '/',
permanent: true,
source: '/now',
},
// `articles`, `notes`, and `blog` to `posts`
{
destination: '/blog',
permanent: true,
source: '/articles',
},
{
destination: '/posts/:path*',
permanent: true,
source: '/articles/:path*',
},
{
destination: '/images/posts/:path*',
permanent: true,
source: '/images/articles/:path*',
},
{
destination: '/blog',
permanent: true,
source: '/notes',
},
{
destination: '/posts/:path*',
permanent: true,
source: '/notes/:path*',
},
{
destination: '/images/posts/:path*',
permanent: true,
source: '/images/notes/:path*',
},
{
destination: '/posts',
permanent: true,
source: '/blog',
},
{
destination: '/posts/:path*',
permanent: true,
source: '/blog/:path*',
},
{
destination: '/images/posts/:path*',
permanent: true,
source: '/images/blog/:path*',
},
],
}
module.exports = nextConfig