From f8b79ddcd8712c3754b010ef55605c7c64ba1b72 Mon Sep 17 00:00:00 2001 From: braginini Date: Tue, 23 May 2023 20:09:00 +0200 Subject: [PATCH] Fix links --- next.config.mjs | 11 +++--- src/components/Guides.jsx | 4 +-- src/components/Header.jsx | 4 +-- src/components/Layout.jsx | 2 +- src/components/NavigationAPI.jsx | 34 +++++++++---------- src/components/NavigationDocs.jsx | 4 +-- src/components/Resources.jsx | 22 ++++++------ .../docs/how-to/access-netbird-public-api.mdx | 4 +-- src/pages/docs/how-to/cli.mdx | 4 +-- .../docs/selfhosted/identity-providers.mdx | 4 +-- src/pages/ipa/guides/authentication.mdx | 4 +-- src/pages/ipa/guides/quickstart.mdx | 10 +++--- src/pages/ipa/introduction.mdx | 4 +-- 13 files changed, 56 insertions(+), 55 deletions(-) diff --git a/next.config.mjs b/next.config.mjs index ea1a94e6..669e58a8 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -22,22 +22,23 @@ const nextConfig = { experimental: { scrollRestoration: true, }, - redirects: async () => { + rewrites: async () => { return [ { source: '/', destination: '/docs/introduction', - permanent: true, }, { source: '/docs', destination: '/docs/introduction', - permanent: true, }, { - source: '/ipa', + source: '/api', destination: '/ipa/introduction', - permanent: true, + }, + { + source: '/api/:path*', + destination: '/ipa/:path*', } ] } diff --git a/src/components/Guides.jsx b/src/components/Guides.jsx index 764ee7fe..4b8ed384 100644 --- a/src/components/Guides.jsx +++ b/src/components/Guides.jsx @@ -3,12 +3,12 @@ import { Heading } from '@/components/Heading' const guides = [ { - href: '/ipa/guides/authentication', + href: '/api/guides/authentication', name: 'Authentication', description: 'Learn how to authenticate your API requests.', }, { - href: '/ipa/guides/errors', + href: '/api/guides/errors', name: 'Errors', description: 'Read about the different types of errors returned by the API.', diff --git a/src/components/Header.jsx b/src/components/Header.jsx index 2a9f9f9f..44ba83d7 100644 --- a/src/components/Header.jsx +++ b/src/components/Header.jsx @@ -69,8 +69,8 @@ export const Header = forwardRef(function Header({ className }, ref) {