import React from 'react' import { useRouter } from 'next/router' import { GeistSans } from 'geist/font/sans' import { DocsThemeConfig, useConfig, ThemeSwitch } from 'nextra-theme-docs' import { Steps, Tabs, Cards, FileTree, Button } from 'nextra/components' import { Callout } from '@/components/callouts/callout' import Carousel from '@/components/carousel/Carousel' import { Logo } from '@/components/logo' import { Frame } from './components/Frame' import { OptionTable } from 'components/table' import FooterMenu from './components/FooterMenu' /** Nextra docs theme configuration. Social card images are chosen based on the current page path (docs, blog, changelog). */ const config: DocsThemeConfig = { logo: , logoLink: '/', project: { link: 'https://github.com/danny-avila/LibreChat', }, chat: { link: 'https://discord.librechat.ai', }, search: { placeholder: 'Search...', }, navbar: { extraContent: () => { return <>{ThemeSwitch({ lite: true, className: 'button-switch theme-switch' })} }, }, sidebar: { defaultMenuCollapseLevel: 1, toggleButton: true, }, editLink: { content: 'Edit this page on GitHub', }, toc: { backToTop: true, }, docsRepositoryBase: 'https://github.com/LibreChat-AI/librechat.ai/tree/main', footer: { content: , }, head: () => { const { asPath, defaultLocale, locale } = useRouter() const { frontMatter, title: pageTitle } = useConfig() const url = 'https://librechat.ai' + (defaultLocale === locale ? asPath : `/${locale}${asPath}`) const description = frontMatter.description ?? '' const title = frontMatter.title ?? pageTitle // Default frontmatter image based on path const defaultImage = asPath.startsWith('/docs') ? '/images/socialcards/default-docs-image.png' : asPath.startsWith('/blog') ? '/images/socialcards/default-blog-image.png' : asPath.startsWith('/changelog') ? '/images/socialcards/default-changelog-image.png' : '/images/socialcards/default-image.png' const image = frontMatter.ogImage ? 'https://www.librechat.ai' + frontMatter.ogImage // Use frontmatter image if available : defaultImage // Use default image based on path if frontmatter image is not available const video = frontMatter.ogVideo ? 'https://www.librechat.ai' + frontMatter.ogVideo : null return ( <> {title} {video && }