Fix links

This commit is contained in:
braginini
2023-05-23 20:09:00 +02:00
parent 8d3ca83eb0
commit f8b79ddcd8
13 changed files with 56 additions and 55 deletions

View File

@@ -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.',

View File

@@ -69,8 +69,8 @@ export const Header = forwardRef(function Header({ className }, ref) {
<nav className="hidden md:block">
<ul role="list" className="flex items-center gap-8">
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
<TopLevelNavItem href="/docs/introduction">Docs</TopLevelNavItem>
<TopLevelNavItem href="/ipa/introduction">API</TopLevelNavItem>
<TopLevelNavItem href="/docs">Docs</TopLevelNavItem>
<TopLevelNavItem href="/api">API</TopLevelNavItem>
<TopLevelNavItem href="https://netbird.io/blog/">Blog</TopLevelNavItem>
<TopLevelNavItem href="https://github.com/netbirdio/netbird">Github</TopLevelNavItem>
<TopLevelNavItem href="https://join.slack.com/t/netbirdio/shared_invite/zt-vrahf41g-ik1v7fV8du6t0RwxSrJ96A">Support</TopLevelNavItem>

View File

@@ -168,7 +168,7 @@ export function Layout({ children, title, tableOfContents }) {
</main>
<Footer />
</div>
{!router.route.startsWith("/ipa/resources") && <div className="hidden xl:sticky xl:top-[4.5rem] xl:-mr-6 xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6">
{!router.route.startsWith("/api/resources") && <div className="hidden xl:sticky xl:top-[4.5rem] xl:-mr-6 xl:block xl:h-[calc(100vh-4.5rem)] xl:flex-none xl:overflow-y-auto xl:py-16 xl:pr-6">
<nav aria-labelledby="on-this-page-title" className="w-80">
{tableOfContents.length > 0 && (
<>

View File

@@ -11,26 +11,26 @@ export const apiNavigation = [
{
title: 'Guides',
links: [
{ title: 'Quickstart', href: '/ipa/guides/quickstart' },
{ title: 'Authentication', href: '/ipa/guides/authentication' },
{ title: 'Errors', href: '/ipa/guides/errors' },
{ title: 'Quickstart', href: '/api/guides/quickstart' },
{ title: 'Authentication', href: '/api/guides/authentication' },
{ title: 'Errors', href: '/api/guides/errors' },
// { title: 'Events', href: '/accounts' },
],
},
{
title: 'Resources',
links: [
{ title: 'Accounts', href: '/ipa/resources/accounts' },
{ title: 'Users', href: '/ipa/resources/users' },
{ title: 'Tokens', href: '/ipa/resources/tokens' },
{ title: 'Peers', href: '/ipa/resources/peers' },
{ title: 'Setup Keys', href: '/ipa/resources/setup-keys' },
{ title: 'Groups', href: '/ipa/resources/groups' },
{ title: 'Rules', href: '/ipa/resources/rules' },
{ title: 'Policies', href: '/ipa/resources/policies' },
{ title: 'Routes', href: '/ipa/resources/routes' },
{ title: 'DNS', href: '/ipa/resources/dns' },
{ title: 'Events', href: '/ipa/resources/events' },
{ title: 'Accounts', href: '/api/resources/accounts' },
{ title: 'Users', href: '/api/resources/users' },
{ title: 'Tokens', href: '/api/resources/tokens' },
{ title: 'Peers', href: '/api/resources/peers' },
{ title: 'Setup Keys', href: '/api/resources/setup-keys' },
{ title: 'Groups', href: '/api/resources/groups' },
{ title: 'Rules', href: '/api/resources/rules' },
{ title: 'Policies', href: '/api/resources/policies' },
{ title: 'Routes', href: '/api/resources/routes' },
{ title: 'DNS', href: '/api/resources/dns' },
{ title: 'Events', href: '/api/resources/events' },
],
},
]
@@ -40,8 +40,8 @@ export function NavigationAPI({tableOfContents, className}) {
<nav className={className}>
<ul role="list">
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
<TopLevelNavItem href="/docs/introduction">Docs</TopLevelNavItem>
<TopLevelNavItem href="/ipa/introduction">API</TopLevelNavItem>
<TopLevelNavItem href="/docs">Docs</TopLevelNavItem>
<TopLevelNavItem href="/api">API</TopLevelNavItem>
<TopLevelNavItem href="https://netbird.io/blog/">Blog</TopLevelNavItem>
<TopLevelNavItem href="https://github.com/netbirdio/netbird">Github</TopLevelNavItem>
<TopLevelNavItem href="https://join.slack.com/t/netbirdio/shared_invite/zt-vrahf41g-ik1v7fV8du6t0RwxSrJ96A">Support</TopLevelNavItem>
@@ -183,7 +183,7 @@ function NavigationGroup({ group, className, tableOfContents }) {
transition: { duration: 0.15 },
}}
>
{router.route.startsWith("/ipa/resources") && tableOfContents?.map((section) => (
{router.route.startsWith("/api/resources") && tableOfContents?.map((section) => (
<li key={section.id}>
<NavLink
href={`${link.href}#${section.id}`}

View File

@@ -47,8 +47,8 @@ export function NavigationDocs({className}) {
<nav className={className}>
<ul role="list">
<TopLevelNavItem href="https://netbird.io/">Home</TopLevelNavItem>
<TopLevelNavItem href="/docs/introduction">Docs</TopLevelNavItem>
<TopLevelNavItem href="/ipa/introduction">API</TopLevelNavItem>
<TopLevelNavItem href="/docs">Docs</TopLevelNavItem>
<TopLevelNavItem href="/api">API</TopLevelNavItem>
<TopLevelNavItem href="https://netbird.io/blog/">Blog</TopLevelNavItem>
<TopLevelNavItem href="https://github.com/netbirdio/netbird">Github</TopLevelNavItem>
<TopLevelNavItem href="https://join.slack.com/t/netbirdio/shared_invite/zt-vrahf41g-ik1v7fV8du6t0RwxSrJ96A">Support</TopLevelNavItem>

View File

@@ -10,7 +10,7 @@ import { UsersIcon } from '@/components/icons/UsersIcon'
const resources = [
{
href: '/ipa/resources/accounts',
href: '/api/resources/accounts',
name: 'Accounts',
description:
'Learn how to list and update accounts.',
@@ -24,7 +24,7 @@ const resources = [
},
},
{
href: '/ipa/resources/users',
href: '/api/resources/users',
name: 'Users',
description:
'Learn how to create, update, delete, and list users.',
@@ -38,7 +38,7 @@ const resources = [
},
},
{
href: '/ipa/resources/tokens',
href: '/api/resources/tokens',
name: 'Tokens',
description:
'Learn how to create, retrieve, delete, and list tokens.',
@@ -52,7 +52,7 @@ const resources = [
},
},
{
href: '/ipa/resources/peers',
href: '/api/resources/peers',
name: 'Peers',
description:
'Learn how to retrieve, update, delete, and list peers.',
@@ -66,7 +66,7 @@ const resources = [
},
},
{
href: '/ipa/resources/setup-keys',
href: '/api/resources/setup-keys',
name: 'Setup Keys',
description:
'Learn how to create, retrieve, update, and list setup keys.',
@@ -77,7 +77,7 @@ const resources = [
},
},
{
href: '/ipa/resources/groups',
href: '/api/resources/groups',
name: 'Groups',
description:
'Learn how to create, retrieve, update, delete, and list groups.',
@@ -88,7 +88,7 @@ const resources = [
},
},
{
href: '/ipa/resources/rules',
href: '/api/resources/rules',
name: 'Rules',
description:
'Learn how to create, retrieve, update, delete, and list rules.',
@@ -99,7 +99,7 @@ const resources = [
},
},
{
href: '/ipa/resources/policies',
href: '/api/resources/policies',
name: 'Policies',
description:
'Learn how to create, retrieve, update, delete, and list policies.',
@@ -110,7 +110,7 @@ const resources = [
},
},
{
href: '/ipa/resources/routes',
href: '/api/resources/routes',
name: 'Routes',
description:
'Learn about how to create, retrieve, update, delete, and list routes.',
@@ -121,7 +121,7 @@ const resources = [
},
},
{
href: '/ipa/resources/dns',
href: '/api/resources/dns',
name: 'DNS',
description:
'Learn about how to create, retrieve, update, delete, and list nameserver groups and update and retrieve DNS settings.',
@@ -132,7 +132,7 @@ const resources = [
},
},
{
href: '/ipa/resources/events',
href: '/api/resources/events',
name: 'Events',
description:
'Learn about how to list events.',