Fix old /docs redirects

This commit is contained in:
braginini
2023-05-24 16:23:39 +02:00
parent 2f568f7c61
commit 99398088f8

View File

@@ -1,7 +1,7 @@
import nextMDX from '@next/mdx'
import { remarkPlugins } from './mdx/remark.mjs'
import { rehypePlugins } from './mdx/rehype.mjs'
import { recmaPlugins } from './mdx/recma.mjs'
import {remarkPlugins} from './mdx/remark.mjs'
import {rehypePlugins} from './mdx/rehype.mjs'
import {recmaPlugins} from './mdx/recma.mjs'
const withMDX = nextMDX({
options: {
@@ -22,6 +22,20 @@ const nextConfig = {
experimental: {
scrollRestoration: true,
},
redirects: async () => {
return [
{
source: '/docs',
destination: '/',
permanent: true,
},
{
source: '/docs/:path*',
destination: '/:path*',
permanent: true,
}
]
},
rewrites: async () => {
return [
{