import React, { Fragment } from "react";
import { useConfig, DocsThemeConfig } from "nextra-theme-docs";
import LogoMark from "@/components/LogoMark";
import FooterMenu from "@/components/FooterMenu";
import JSONLD from "@/components/JSONLD";
import { useRouter } from "next/router";
import Link from "next/link";
import { LibraryBig, Blocks, BrainCircuit, Computer } from "lucide-react";
import { AiOutlineGithub } from "react-icons/ai";
import { BiLogoDiscordAlt } from "react-icons/bi";
import { RiTwitterXFill } from "react-icons/ri";
const defaultUrl = "https://jan.ai";
const defaultImage = "https://jan.ai/assets/images/general/og-image.png";
const structuredData = {
"@context": "https://schema.org",
"@type": "Organization",
name: "Jan",
url: `${defaultUrl}`,
logo: `${defaultImage}`,
};
const config: DocsThemeConfig = {
logo: (
Jan
),
docsRepositoryBase: "https://github.com/menloresearch/jan/tree/dev/docs",
feedback: {
content: "Question? Give us feedback →",
labels: "feedback",
},
editLink: {
text: "Edit this page on GitHub →",
},
useNextSeoProps() {
return {
titleTemplate: "%s - Jan",
twitter: {
cardType: "summary_large_image",
site: "@jandotai",
},
openGraph: {
type: "website",
},
};
},
navbar: {
extraContent: (
),
},
sidebar: {
titleComponent: ({ type, title }) => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const { asPath } = useRouter();
if (type === "separator" && title === "Switcher") {
return (
{[
{
title: "Jan Server",
path: "/server",
Icon: Computer,
},
{
title: "Jan Desktop & Mobile",
path: "/docs",
Icon: LibraryBig,
},
].map((item) =>
asPath.startsWith(item.path) ? (
{item.title}
) : (
{item.title}
),
)}
);
}
return title;
},
defaultMenuCollapseLevel: 1,
toggleButton: true,
},
toc: {
backToTop: true,
},
head: function useHead() {
const { title, frontMatter } = useConfig();
const titleTemplate = (frontMatter?.title || title) + " - " + "Jan";
const { asPath } = useRouter();
return (
{titleTemplate}
keyword) || [
"Jan",
"Customizable Intelligence, LLM",
"local AI",
"privacy focus",
"free and open source",
"private and offline",
"conversational AI",
"no-subscription fee",
"large language models",
"build in public",
"remote team",
"how we work",
]
}
/>
);
},
footer: {
text: ,
},
nextThemes: {
defaultTheme: "light",
},
};
export default config;