docs: preparations for preview (#7267)

* configured base paths + added development banner

* fix typelist site url

* added navbar and sidebar badges

* configure algolia filters

* remove AI assistant

* remove unused imports

* change navbar text and badge

* lint fixes

* fix build error

* add to api reference rewrites

* fix build error

* fix build errors in user-guide

* fix feedback component

* add parent title to pagination

* added breadcrumbs component

* remove user-guide links

* resolve todos

* fix details about authentication

* change documentation title

* lint content
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-05-13 11:32:52 +03:00
1 parent 3e3b8a483f
commit 728c5ee53c
62 files changed
+855 -506

No files matched your search

@@ -1,17 +1,29 @@
import { NavbarLinkProps, navbarItems } from ".."
import { NavbarItem, legacyNavbarItems, navbarItemsV1, navbarItemsV2 } from ".."
type Options = {
basePath: string
activePath: string
version?: "v1" | "v2" | "legacy"
}
export function getNavbarItems({
basePath,
activePath,
}: Options): NavbarLinkProps[] {
return navbarItems.map((item) => ({
...item,
isActive: activePath === item.href,
href: `${basePath}${item.href}`,
}))
version = "legacy"
}: Options): NavbarItem[] {
const navbarItems = version === "v2" ? navbarItemsV2 : version === "v1" ? navbarItemsV1 : legacyNavbarItems
return navbarItems.map((item) => {
if (item.type === "divider") {
return item
}
return {
...item,
props: {
...item.props,
isActive: activePath === item.props?.href,
href: `${basePath}${item.props?.href}`,
}
}
})
}