From 6cc09ad5a5578f25092e58f90b3531e75648621b Mon Sep 17 00:00:00 2001 From: Nathan Totten Date: Mon, 9 Oct 2023 13:20:44 -0400 Subject: [PATCH] basepath --- next.config.mjs | 8 +- src/app/{docs => }/[...slug]/page.tsx | 0 .../{docs => }/articles/node-modules/page.tsx | 0 src/app/not-found.tsx | 2 +- src/app/{docs => }/policies/[slug]/page.tsx | 0 src/app/{docs => }/policies/page.tsx | 15 +- src/components/Search.tsx | 2 +- src/lib/content.ts | 4 +- src/lib/navigation.ts | 162 +++++++++--------- 9 files changed, 93 insertions(+), 100 deletions(-) rename src/app/{docs => }/[...slug]/page.tsx (100%) rename src/app/{docs => }/articles/node-modules/page.tsx (100%) rename src/app/{docs => }/policies/[slug]/page.tsx (100%) rename src/app/{docs => }/policies/page.tsx (77%) diff --git a/next.config.mjs b/next.config.mjs index a9208ea9..38d82f19 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -4,6 +4,7 @@ import withSearch from "./src/markdoc/search.mjs"; const nextConfig = { swcMinify: true, reactStrictMode: true, + basePath: "/docs", images: { deviceSizes: [576, 640, 760, 828, 992, 1180, 1440], imageSizes: [96, 128, 256, 384], @@ -15,13 +16,6 @@ const nextConfig = { }, ], }, - redirects: async () => [ - { - source: "/", - destination: "/docs", - statusCode: 308, - }, - ], webpack(config) { config.module.rules.push({ test: /\.svg$/i, diff --git a/src/app/docs/[...slug]/page.tsx b/src/app/[...slug]/page.tsx similarity index 100% rename from src/app/docs/[...slug]/page.tsx rename to src/app/[...slug]/page.tsx diff --git a/src/app/docs/articles/node-modules/page.tsx b/src/app/articles/node-modules/page.tsx similarity index 100% rename from src/app/docs/articles/node-modules/page.tsx rename to src/app/articles/node-modules/page.tsx diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index 82c6c2ce..1852a4d5 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -14,7 +14,7 @@ export default function NotFound() { Sorry, we couldn’t find the page you’re looking for.

Go back to docs diff --git a/src/app/docs/policies/[slug]/page.tsx b/src/app/policies/[slug]/page.tsx similarity index 100% rename from src/app/docs/policies/[slug]/page.tsx rename to src/app/policies/[slug]/page.tsx diff --git a/src/app/docs/policies/page.tsx b/src/app/policies/page.tsx similarity index 77% rename from src/app/docs/policies/page.tsx rename to src/app/policies/page.tsx index b197a541..4d1591b6 100644 --- a/src/app/docs/policies/page.tsx +++ b/src/app/policies/page.tsx @@ -1,7 +1,7 @@ import { Metadata } from "next"; import Link from "next/link"; -import { DocsHeader } from "../../../components/DocsHeader"; -import { getAllPolicies } from "../../../lib/policies"; +import { DocsHeader } from "../../components/DocsHeader"; +import { getAllPolicies } from "../../lib/policies"; export const metadata: Metadata = { title: "Policies", @@ -16,15 +16,14 @@ export default async function Page() {

Zuplo includes policies for any solution you need for securing and sharing your API. See the{" "} - policy introduction to learn about - using policies. + policy introduction to learn about using + policies.

- The CORS policy is - a special type of policy that is configured separately. Check out - details - here. + The CORS policy is a + special type of policy that is configured separately. Check out details + here.