forked from pyth-network/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
131 lines (120 loc) · 3.61 KB
/
next.config.js
File metadata and controls
131 lines (120 loc) · 3.61 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
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
128
129
130
131
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});
// Use this array as a shorter way to specify redirect URLs so we can write down a lot of them.
const permanentRedirectArray = [
// Third version redirects
["/", "/home"],
// First version of docs site -> third version
["/evm", "/price-feeds/use-real-time-data/evm"],
["/aptos", "/price-feeds/use-real-time-data/aptos"],
["/cosmwasm", "/price-feeds/use-real-time-data/cosmwasm"],
// Second version of docs site -> third version
["/documentation/metrics/:path*", "/home/metrics/:path*"],
[
"/documentation/how-pyth-works/:slug*",
"/price-feeds/how-pyth-works/:slug*",
],
["/documentation/benchmarks", "/benchmarks"],
["/pyth-token/:path*", "/home/pyth-token/:path*"],
["/documentation/publish-data/:slug*", "/price-feeds/publish-data/:slug*"],
[
"/documentation/solana-price-feeds/:slug*",
"/price-feeds/solana-price-feeds/:slug*",
],
["/documentation/whitepaper/:slug*", "/price-feeds/whitepaper/:slug*"],
["/documentation/security", "/home/security"],
["/documentation/entropy", "/entropy"],
["/documentation/entropy/protocol-design", "/entropy/protocol-design"],
["/documentation/entropy/best-practices", "/entropy/best-practices"],
[
"/documentation/entropy/solidity-sdk",
"/entropy/generate-random-numbers/solidity-sdk",
],
[
"/documentation/entropy/evm",
"/entropy/generate-random-numbers/solidity-sdk",
],
["/documentation/pythnet-price-feeds", "/price-feeds/pythnet-price-feeds"],
[
"/documentation/pythnet-price-feeds/on-demand",
"/price-feeds/pythnet-price-feeds/pull-updates",
],
[
"/documentation/pythnet-price-feeds/best-practices",
"/price-feeds/best-practices",
],
[
"/price-feeds/pythnet-price-feeds/best-practices",
"/price-feeds/best-practices",
],
[
"/price-feeds/solana-price-feeds/best-practices",
"/price-feeds/best-practices",
],
[
"/documentation/pythnet-price-feeds/hermes",
"/price-feeds/pythnet-price-feeds/hermes",
],
[
"/documentation/pythnet-price-feeds/scheduler",
"/price-feeds/schedule-price-updates/using-scheduler",
],
[
"/documentation/pythnet-price-feeds/aptos",
"/price-feeds/use-real-time-data/aptos",
],
[
"/documentation/pythnet-price-feeds/cosmwasm",
"/price-feeds/use-real-time-data/cosmwasm",
],
[
"/documentation/pythnet-price-feeds/sui",
"/price-feeds/use-real-time-data/sui",
],
[
"/documentation/pythnet-price-feeds/near",
"/price-feeds/use-real-time-data/near",
],
[
"/documentation/pythnet-price-feeds/off-chain",
"/price-feeds/use-real-time-data/off-chain",
],
[
"/documentation/pythnet-price-feeds/evm",
"/price-feeds/use-real-time-data/evm",
],
["/documentation", "/home"],
["/api-explorer/:slug*", "/price-feeds/api-reference/:slug*"],
[
"/guides/how-to-schedule-price-updates-with-gelato",
"/price-feeds/schedule-price-updates/using-gelato",
],
[
"/guides/how-to-create-tradingview-charts",
"/benchmarks/how-to-create-tradingview-charts",
],
["/guides", "/price-feeds"],
];
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
webpack: (config) => {
config.resolve.fallback = { fs: false, net: false, tls: false };
return config;
},
async redirects() {
return permanentRedirectArray.map((value) => {
return {
source: value[0],
destination: value[1],
permanent: true,
};
});
},
};
module.exports = withNextra(nextConfig);