tldraw/apps/docs/next.config.js
Mime Čuvalo 92b16f6310
docs: fix up gen links to point to the new /reference section (#2690)
### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Fix up doc links with /gen links
2024-01-30 15:16:32 +00:00

64 lines
1.6 KiB
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
scrollRestoration: true,
},
transpilePackages: [],
async redirects() {
return [
{
// For reverse compatibility with old links
source: '/:sectionId/ucg/:articleId',
destination: '/:sectionId/:articleId',
permanent: true,
},
{
// For reverse compatibility with old links
source: '/docs/introduction',
destination: '/quick-start',
permanent: true,
},
{
// For reverse compatibility with old links
source: '/introduction',
destination: '/quick-start',
permanent: true,
},
{
// For reverse compatibility with old links
source: '/docs/installation',
destination: '/installation',
permanent: true,
},
{
// For reverse compatibility with old links
source: '/docs/usage',
destination: '/usage',
permanent: true,
},
{
// To reflect that these are at the top level of the sidebar
source: '/getting-started/:childId',
destination: '/:childId',
permanent: true,
},
{
// For reverse compatibility with old links
// (This is a page that we referred people to quite often)
source: '/gen/editor/Editor-class',
destination: '/reference/editor/Editor',
permanent: true,
},
{
// For reverse compatibility with old links
// (This is a page that we referred people to quite often)
source: '/gen/editor/ShapeUtil-class',
destination: '/reference/editor/ShapeUtil',
permanent: true,
},
]
},
}
module.exports = nextConfig