-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathnext.config.mjs
More file actions
84 lines (82 loc) · 1.92 KB
/
next.config.mjs
File metadata and controls
84 lines (82 loc) · 1.92 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
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
import nextra from 'nextra'
const withNextra = nextra({
defaultShowCopyCode: true,
latex: true,
contentDirBasePath: '/',
unstable_shouldAddLocaleToLinks: true
// ... Other Nextra config options
})
// You can include other Next.js configuration options here, in addition to Nextra settings
export default withNextra({
redirects: async () => {
return [
{
source: '/:locale(en|zh)/playground/webnn',
destination: '/:locale/playground/',
permanent: true,
},
{
source: '/playground/webnn',
destination: '/playground',
permanent: true,
},
{
source: '/:locale(en|zh)/playground/onnxruntime',
destination: '/:locale/playground/',
permanent: true,
},
{
source: '/playground/onnxruntime',
destination: '/playground',
permanent: true,
},
{
source: '/:locale(en|zh)/playground/transformersjs',
destination: '/:locale/playground/',
permanent: true,
},
{
source: '/playground/transformersjs',
destination: '/playground',
permanent: true,
},
{
source: '/:locale(en|zh)/playground/litert',
destination: '/:locale/playground/',
permanent: true,
},
{
source: '/playground/litert',
destination: '/playground',
permanent: true,
},
]
},
i18n: {
locales: ['en', 'zh'],
defaultLocale: 'en'
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'microsoft.github.io',
port: '',
pathname: '/webnn-developer-preview/**',
search: '',
},
{
protocol: 'https',
hostname: 'webmachinelearning.github.io',
port: '',
search: '',
},
{
protocol: 'https',
hostname: 'webnn.io',
port: '',
search: '',
},
],
},
})