This repository was archived by the owner on May 2, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathnext.config.js
More file actions
149 lines (145 loc) · 3.88 KB
/
Copy pathnext.config.js
File metadata and controls
149 lines (145 loc) · 3.88 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
const withNextra = require("nextra")({
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
});
module.exports = withNextra({
env: {
GITHUB_ACCESS_TOKEN: process.env.GITHUB_ACCESS_TOKEN,
},
eslint: {
ignoreDuringBuilds: false,
},
images: {
unoptimized: true,
domains: ["www.google.com"],
},
async redirects() {
return [
// Redirects to All Pages, leave these as permanent: false
{
source: "/intro_to_cardano",
destination: "/all_pages#intro-to-cardano",
permanent: false,
},
{
source: "/staking:path(|/)",
destination: "/all_pages#staking",
permanent: false,
},
{
source: "/community",
destination: "/all_pages#community",
permanent: false,
},
{
source: "/ecosystem",
destination: "/all_pages#ecosystem",
permanent: false,
},
{
source: "/dapps",
destination: "/all_pages#dapps",
permanent: false,
},
{
source: "/nfts",
destination: "/all_pages#nfts",
permanent: false,
},
{
source: "/gaming",
destination: "/all_pages#gaming",
permanent: false,
},
{
source: "/governance",
destination: "/all_pages#governance",
permanent: false,
},
{
source: "/catalyst",
destination: "/all_pages#project-catalyst",
permanent: false,
},
{
source: "/daos",
destination: "/all_pages#daos",
permanent: false,
},
{
source: "/development",
destination: "/all_pages#development",
permanent: false,
},
{
source: "/on_chain_metrics",
destination: "/all_pages#on-chain-metrics",
permanent: false,
},
{
source: "/partner_chains",
destination: "/all_pages#partner-chains",
permanent: false,
},
{
source: "/layer_2s",
destination: "/all_pages#layer-2s",
permanent: false,
},
// Permanent Redirects
{
source: "/live_pages", // old URL
destination: "/all_pages", // new URL
permanent: true, // permanent 308
},
{
source: "/ecosystem/dev_shops", // old URL
destination: "/development/dev_teams", // new URL
permanent: true, // permanent 308
},
{
source: "/sidechains/what_are_sidechains", // old URL
destination: "/partner_chains/what_are_partner_chains", // new URL
permanent: true, // permanent 308
},
{
source: "/staking/reward_calculators", // old URL
destination: "/staking/stake_reward_trackers", // new URL
permanent: true, // permanent 308
},
{
source: "/staking/reward_calendars", // old URL
destination: "/staking/stake_reward_trackers", // new URL
permanent: true, // permanent 308
},
{
source: "/staking/reward_trackers", // old URL
destination: "/staking/stake_reward_trackers", // new URL
permanent: true, // permanent 308
},
{
source: "/ecosystem/ecosystem_maps", // old URL
destination: "/ecosystem/directories", // new URL
permanent: true, // permanent 308
},
{
source: "/gaming/what_is_web3_gaming", // old URL
destination: "/gaming/what_are_web3_games", // new URL
permanent: true, // permanent 308
},
];
},
webpack(config) {
const allowedSvgRegex = /assets\/(icons|logos)\/.+\.svg$/;
const fileLoaderRule = config.module.rules.find((rule) => {
const testRegex = new RegExp(".svg");
return testRegex.test(rule.test);
});
fileLoaderRule.exclude = allowedSvgRegex;
config.module.rules.push({
test: allowedSvgRegex,
use: ["@svgr/webpack"],
});
return config;
},
});