add redirects structure
This commit is contained in:
parent
4315911af4
commit
35db2a4906
|
@ -1,4 +1,5 @@
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
|
const { redirects: redirectsList } = require('./redirects');
|
||||||
|
|
||||||
const withMDX = require('@next/mdx')({
|
const withMDX = require('@next/mdx')({
|
||||||
extension: /\.mdx?$/,
|
extension: /\.mdx?$/,
|
||||||
|
@ -14,5 +15,8 @@ module.exports = withMDX({
|
||||||
reactStrictMode: true,
|
reactStrictMode: true,
|
||||||
swcMinify: true,
|
swcMinify: true,
|
||||||
// Append the default value with md extensions
|
// Append the default value with md extensions
|
||||||
pageExtensions: ['ts', 'tsx', 'md', 'mdx']
|
pageExtensions: ['ts', 'tsx', 'md', 'mdx'],
|
||||||
|
async redirects() {
|
||||||
|
return redirectsList
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
const redirects = [
|
||||||
|
{
|
||||||
|
source: '/about',
|
||||||
|
destination: '/',
|
||||||
|
permanent: true,
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
redirects
|
||||||
|
}
|
Loading…
Reference in New Issue