diff --git a/components-mdx/get-started-langchain-js-constructor-args.mdx b/components-mdx/get-started-langchain-js-constructor-args.mdx index 0e4880a0c..6759c7e07 100644 --- a/components-mdx/get-started-langchain-js-constructor-args.mdx +++ b/components-mdx/get-started-langchain-js-constructor-args.mdx @@ -2,7 +2,7 @@ npm i langfuse-langchain ``` -```typescript +```ts import { CallbackHandler } from "langfuse-langchain"; // Deno: import CallbackHandler from "https://esm.sh/langfuse-langchain"; diff --git a/components-mdx/get-started-langchain-js-env.mdx b/components-mdx/get-started-langchain-js-env.mdx index d29c13ba6..832643c86 100644 --- a/components-mdx/get-started-langchain-js-env.mdx +++ b/components-mdx/get-started-langchain-js-env.mdx @@ -6,7 +6,7 @@ npm i langfuse-langchain -```typescript +```ts import { CallbackHandler } from "langfuse-langchain"; // Deno: import CallbackHandler from "https://esm.sh/langfuse-langchain"; diff --git a/components-mdx/public-metrics.mdx b/components-mdx/public-metrics.mdx index e92a90841..507f42953 100644 --- a/components-mdx/public-metrics.mdx +++ b/components-mdx/public-metrics.mdx @@ -2,7 +2,7 @@ src="https://lookerstudio.google.com/embed/reporting/5198bcda-7d3d-447d-b596-ebe778c5fe99/page/p_vkzvcv38gd" frameborder="0" style={{ border: 0 }} - allowfullscreen + allowFullScreen sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox" className="w-full aspect-square mt-5 rounded overflow-hidden" > diff --git a/components/CookbookIndex.tsx b/components/CookbookIndex.tsx index d07e364dc..6dd24a79b 100644 --- a/components/CookbookIndex.tsx +++ b/components/CookbookIndex.tsx @@ -1,6 +1,6 @@ import { getPagesUnderRoute } from "nextra/context"; import { type Page } from "nextra"; -import { Card, Cards } from "nextra-theme-docs"; +import { Cards } from "nextra/components"; import { FileCode } from "lucide-react"; export const CookbookIndex = ({ categories }: { categories?: string[] }) => ( @@ -37,20 +37,26 @@ export const CookbookIndex = ({ categories }: { categories?: string[] }) => ( .filter(([category]) => !categories || categories.includes(category)) .map(([category, pages]) => (
-

+

{category}

{pages.map((page) => ( - word.charAt(0).toUpperCase() + word.slice(1)) + .join(" ") + } icon={} arrow > {""} - + ))}
diff --git a/components/MenuSwitcher.tsx b/components/MenuSwitcher.tsx new file mode 100644 index 000000000..61e8e0e4d --- /dev/null +++ b/components/MenuSwitcher.tsx @@ -0,0 +1,38 @@ +import { CircleHelp } from "lucide-react"; +import { FileCode } from "lucide-react"; +import { LibraryBig } from "lucide-react"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import React from "react"; + +export const MenuSwitcher = () => { + const { asPath } = useRouter(); + return ( +
+ {[ + { title: "Docs", path: "/docs", Icon: LibraryBig }, + { title: "Guides", path: "/guides", Icon: FileCode }, + { title: "FAQ", path: "/faq", Icon: CircleHelp }, + ].map((item) => + asPath.startsWith(item.path) ? ( +
+ + {item.title} +
+ ) : ( + + + {item.title} + + ) + )} +
+ ); +}; diff --git a/components/NotebookBanner.tsx b/components/NotebookBanner.tsx index 138b9d790..b02bf3df2 100644 --- a/components/NotebookBanner.tsx +++ b/components/NotebookBanner.tsx @@ -1,4 +1,4 @@ -import { Callout } from "nextra-theme-docs"; +import { Callout } from "nextra/components"; import { Button } from "./ui/button"; export const NotebookBanner: React.FC<{ src: string; className?: string }> = ({ diff --git a/components/VideoIndex.tsx b/components/VideoIndex.tsx index 9a470e1b9..70f661bef 100644 --- a/components/VideoIndex.tsx +++ b/components/VideoIndex.tsx @@ -1,19 +1,25 @@ import { getPagesUnderRoute } from "nextra/context"; import { type Page } from "nextra"; -import { Card, Cards } from "nextra-theme-docs"; +import { Cards } from "nextra/components"; import { Video } from "lucide-react"; import Image from "next/image"; export const VideoIndex = () => ( - + {( getPagesUnderRoute("/guides/videos") as Array ).map((page, i) => ( - word.charAt(0).toUpperCase() + word.slice(1)) + .join(" ") + } + // image={Boolean(page.frontMatter.ogImage)} icon={