forked from keystonejs/keystone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredirects.js
127 lines (123 loc) · 3.62 KB
/
redirects.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/* URLs from v4.keystonejs.com */
const KEYSTONE_4 = [
{
source: '/docs/configuration',
destination: 'https://v4.keystonejs.com/docs/configuration',
permanent: true,
},
{
source: '/docs/database',
destination: 'https://v4.keystonejs.com/api/field/options',
permanent: true,
},
{
source: '/docs/getting-started',
destination: 'https://v4.keystonejs.com/getting-started',
permanent: true,
},
{
source: '/documentation/configuration/project-options',
destination: 'https://v4.keystonejs.com/documentation/configuration/project-options',
permanent: true,
},
{
source: '/documentation/database',
destination: 'https://v4.keystonejs.com/documentation/database',
permanent: true,
},
{
source: '/getting-started',
destination: 'https://v4.keystonejs.com/getting-started',
permanent: true,
},
];
/* URLs from v5.keystonejs.com */
const KEYSTONE_5 = [
{
source: '/quick-start',
destination: 'https://v5.keystonejs.com/quick-start/',
permanent: true,
},
{
source: '/quick-start/adapters',
destination: 'https://v5.keystonejs.com/quick-start/adapters',
permanent: true,
},
{
source: '/blog/:slug*',
destination: 'https://v5.keystonejs.com/blog/:slug*',
permanent: true,
},
{
source: '/discussions/:slug*',
destination: 'https://v5.keystonejs.com/discussions/:slug*',
permanent: true,
},
// Old roadmap URL just redirects to the new roadmap
{
source: '/guides/road-map',
destination: '/updates/roadmap',
permanent: true,
},
// Linked to from google results (2021-06-28) and possibly elsewhere?
{
source: '/documentation',
destination: '/docs',
permanent: false,
},
];
/* URLs from the original next.keystonejs.com website */
const ORIGINAL_NEXT = [
{
source: '/faqs',
destination: '/',
permanent: true,
},
{ source: '/apis/:path*', destination: '/docs/apis/:path*', permanent: true },
{ source: '/examples', destination: '/docs/examples', permanent: true },
{
source: '/guides/_doc-field-intro',
destination: '/docs/guides/document-fields',
permanent: true,
},
{
source: '/docs/guides/_doc-field-intro',
destination: '/docs/guides/document-fields',
permanent: true,
},
{ source: '/guides/:path*', destination: '/docs/guides/:path*', permanent: true },
{
source: '/tutorials/embedded-mode-with-sqlite-nextjs',
destination: '/docs/walkthroughs/embedded-mode-with-sqlite-nextjs',
permanent: true,
},
{
source: '/tutorials/getting-started-with-create-keystone-app',
destination: '/docs/walkthroughs/getting-started-with-create-keystone-app',
permanent: true,
},
{ source: '/roadmap', destination: '/updates/roadmap', permanent: true },
{ source: '/whats-new', destination: '/updates/whats-new-in-v6', permanent: true },
];
/* URLs from the current website */
const CURRENT = [
{
source: '/docs/guides/keystone-5-vs-keystone-next',
destination: '/updates/keystone-5-vs-keystone-6-preview',
permanent: true,
},
{
source: '/docs/guides/keystone-5-vs-keystone-6-preview',
destination: '/updates/keystone-5-vs-keystone-6-preview',
permanent: true,
},
{
// create-keystone-app has hidden characters in it's console output when it
// links to this page (when a console does not support hyperlinks), adding
// this condition in case someone copies them accidentally
source: '/docs/guides/keystone-5-vs-keystone-next%E2%80%8B',
destination: '/docs/guides/keystone-5-vs-keystone-next',
permanent: true,
},
];
module.exports = [...CURRENT, ...ORIGINAL_NEXT, ...KEYSTONE_5, ...KEYSTONE_4];