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

+16 -5
View File
@@ -4,23 +4,34 @@ import {
Feedback as UiFeedback,
FeedbackProps as UiFeedbackProps,
formatReportLink,
useIsBrowser,
} from "docs-ui"
import { usePathname } from "next/navigation"
import { config } from "../../config"
import { basePathUrl } from "../../utils/base-path-url"
import { useMemo } from "react"
type FeedbackProps = Omit<UiFeedbackProps, "event" | "pathName">
const Feedback = (props: FeedbackProps) => {
const pathname = usePathname()
const isBrowser = useIsBrowser()
const feedbackPathname = useMemo(() => basePathUrl(pathname), [pathname])
const reportLink = useMemo(
() =>
formatReportLink(
config.titleSuffix || "",
isBrowser ? document.title : ""
),
[isBrowser]
)
return (
<UiFeedback
event="survey"
pathName={pathname}
reportLink={formatReportLink(
config.titleSuffix || "",
typeof document !== "undefined" ? document.title : ""
)}
pathName={feedbackPathname}
reportLink={reportLink}
question="Was this chapter helpful?"
{...props}
/>
+5 -3
View File
@@ -4,6 +4,7 @@ import { Navbar as UiNavbar, getNavbarItems } from "docs-ui"
import { useSidebar } from "docs-ui"
import { useMemo } from "react"
import { config } from "../../config"
import { basePathUrl } from "../../utils/base-path-url"
const Navbar = () => {
const { setMobileSidebarOpen, mobileSidebarOpen } = useSidebar()
@@ -12,7 +13,8 @@ const Navbar = () => {
() =>
getNavbarItems({
basePath: config.baseUrl,
activePath: "/",
activePath: basePathUrl(""),
version: "v2",
}),
[]
)
@@ -20,8 +22,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={{