docs: restructure api-reference to allow base path (#7954)
This commit is contained in:
@@ -22,7 +22,7 @@ const Navbar = () => {
|
||||
() =>
|
||||
getNavbarItems({
|
||||
basePath: config.baseUrl,
|
||||
activePath: pathname,
|
||||
activePath: basePathUrl(pathname),
|
||||
version: "v2",
|
||||
}),
|
||||
[pathname]
|
||||
@@ -31,8 +31,8 @@ const Navbar = () => {
|
||||
return (
|
||||
<UiNavbar
|
||||
logo={{
|
||||
light: "/images/logo-icon.png",
|
||||
dark: "/images/logo-icon-dark.png",
|
||||
light: basePathUrl("/images/logo-icon.png"),
|
||||
dark: basePathUrl("/images/logo-icon-dark.png"),
|
||||
}}
|
||||
items={navbarItems}
|
||||
mobileMenuButton={{
|
||||
|
||||
@@ -43,7 +43,7 @@ const TagPaths = ({ tag, className }: TagPathsProps) => {
|
||||
paths: PathsObject
|
||||
}>(
|
||||
!Object.keys(paths).length
|
||||
? basePathUrl(`/tag?tagName=${tagSlugName}&area=${area}`)
|
||||
? basePathUrl(`/api/tag?tagName=${tagSlugName}&area=${area}`)
|
||||
: null,
|
||||
swrFetcher,
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ const TagSection = ({ tag }: TagSectionProps) => {
|
||||
}>(
|
||||
tag["x-associatedSchema"]
|
||||
? basePathUrl(
|
||||
`/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
|
||||
`/api/schema?name=${tag["x-associatedSchema"].$ref}&area=${area}`
|
||||
)
|
||||
: null,
|
||||
swrFetcher,
|
||||
|
||||
@@ -36,7 +36,7 @@ const Tags = () => {
|
||||
|
||||
const { data } = useSWR<ExpandedDocument>(
|
||||
loadData && !baseSpecs
|
||||
? basePathUrl(`/base-specs?area=${area}&expand=${expand}`)
|
||||
? basePathUrl(`/api/base-specs?area=${area}&expand=${expand}`)
|
||||
: null,
|
||||
swrFetcher,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user