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:
1 parent
3e3b8a483f
commit
728c5ee53c
62 files changed
+855
-506
No files matched your search
@@ -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 { useMemo } from "react"
|
||||
import { basePathUrl } from "../../utils/base-path-url"
|
||||
|
||||
type FeedbackProps = Omit<UiFeedbackProps, "event" | "pathName">
|
||||
|
||||
export 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 page helpful?"
|
||||
{...props}
|
||||
/>
|
||||
|
||||
@@ -12,7 +12,8 @@ const Navbar = () => {
|
||||
() =>
|
||||
getNavbarItems({
|
||||
basePath: config.baseUrl,
|
||||
activePath: process.env.NEXT_PUBLIC_BASE_PATH || "/resources",
|
||||
activePath: basePathUrl(""),
|
||||
version: "v2",
|
||||
}),
|
||||
[]
|
||||
)
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import { TypeList as UiTypeList } from "docs-ui"
|
||||
import { ComponentProps } from "react"
|
||||
import { config } from "@/config"
|
||||
|
||||
const TypeList = (props: ComponentProps<typeof UiTypeList>) => {
|
||||
return <UiTypeList {...props} siteUrl={config.baseUrl} />
|
||||
}
|
||||
|
||||
export default TypeList
|
||||
Reference in new issue
Block a user