docs: change configurations to make v2 the main docs (#9729)

* docs: change configurations to make v2 the main docs

* move api routes to top level

* remove api prefix

* update opengraph images

* show v1 link

* add redirect to v1
This commit is contained in:
Shahed Nasser
2024-10-24 14:49:58 +03:00
committed by GitHub
parent 471f7e4a10
commit 88f2d17a24
40 changed files with 115 additions and 128 deletions
+10 -1
View File
@@ -5,13 +5,22 @@ import rehypeSlug from "rehype-slug"
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/v2/api",
basePath: process.env.NEXT_PUBLIC_BASE_PATH || "/api",
webpack: (config) => {
config.ignoreWarnings = [{ module: /node_modules\/keyv\/src\/index\.js/ }]
return config
},
transpilePackages: ["docs-ui"],
async redirects() {
return [
{
source: "/api/download/:path",
destination: "/download/:path",
permanent: true,
},
]
},
}
const withMDX = mdx({