Files
formbricks-formbricks/apps/docs/next.config.mjs
Dhruwang Jariwala 9dad06222d chore: move ui components to modules (#4342)
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
2024-11-21 17:58:15 +00:00

145 lines
3.7 KiB
JavaScript

import nextMDX from "@next/mdx";
import { recmaPlugins } from "./mdx/recma.mjs";
import { rehypePlugins } from "./mdx/rehype.mjs";
import { remarkPlugins } from "./mdx/remark.mjs";
import { Search as withSearch } from "./mdx/search.mjs";
const withMDX = nextMDX({
options: {
remarkPlugins,
rehypePlugins,
recmaPlugins,
},
});
/** @type {import('next').NextConfig} */
const nextConfig = {
basePath: "/docs",
pageExtensions: ["js", "jsx", "ts", "tsx", "mdx"],
transpilePackages: ["@formbricks/lib"],
images: {
remotePatterns: [
{
protocol: "https",
hostname: "avatars.githubusercontent.com",
port: "",
},
],
},
async redirects() {
return [
{
source: "/",
destination: "/introduction/what-is-formbricks",
permanent: true,
},
{
source: "/introduction/why-is-it-better",
destination: "/introduction/why-open-source",
permanent: true,
},
// Redirects for Docs 2.0
// Self Hosting
{
source: "/self-hosting/deployment",
destination: "/self-hosting/overview",
permanent: true,
},
{
source: "/self-hosting/production",
destination: "/self-hosting/one-click",
permanent: true,
},
{
source: "/self-hosting/external-auth-providers",
destination: "/self-hosting/configure",
permanent: true,
},
{
source: "/self-hosting/enterprise",
destination: "/self-hosting/license",
permanent: true,
},
// Developer Docs
{
source: "/contributing/:path",
destination: "/developer-docs/contributing",
permanent: true,
},
{
source: "/additional-features/api",
destination: "/developer-docs/rest-api",
permanent: true,
},
{
source: "/in-app-surveys/developer-quickstart",
destination: "/developer-docs/overview",
permanent: true,
},
// Link Survey
{
source: "/link-surveys/embed-in-email",
destination: "/link-surveys/embed-surveys",
permanent: true,
},
// App & Website Survey
{
source: "/getting-started/quickstart-in-app-survey",
destination: "/app-surveys/quickstart",
permanent: true,
},
{
source: "/getting-started/framework-guides",
destination: "/app-surveys/framework-guides",
permanent: true,
},
{
source: "/in-app-surveys/:path",
destination: "/app-surveys/:path",
permanent: true,
},
{
source: "/app-surveys/attributes",
destination: "/app-surveys/user-identification",
permanent: true,
},
// Global Features
{
source: "/global/custom-start-end-conditions",
destination: "/global/schedule-start-end-dates",
permanent: true,
},
{
source: "/global/logic-editor",
destination: "/global/conditional-logic",
permanent: true,
},
// Integrations
{
source: "/integrations/:path",
destination: "/developer-docs/integrations/:path",
permanent: true,
},
{
source: "/developer-docs/website-survey-sdk",
destination: "/developer-docs/js-sdk",
permanent: true,
},
{
source: "/website-surveys/quickstart",
destination: "/app-surveys/quickstart",
permanent: true,
},
{
source: "/website-surveys/framework-guides",
destination: "/app-surveys/framework-guides",
permanent: true,
},
];
},
};
export default withSearch(withMDX(nextConfig));