diff --git a/website/src/components/navbar/index.tsx b/website/src/components/navbar/index.tsx index fc2a35a33..72cbd4ddc 100644 --- a/website/src/components/navbar/index.tsx +++ b/website/src/components/navbar/index.tsx @@ -3,6 +3,7 @@ import { useLocation } from "@docusaurus/router"; import { AcademicCapIcon, ArrowPathIcon, + ArrowRightIcon, BookOpenIcon, BriefcaseIcon, BuildingLibraryIcon, @@ -15,7 +16,9 @@ import { ComputerDesktopIcon, CurrencyDollarIcon, DocumentTextIcon, + HomeIcon, InformationCircleIcon, + MagnifyingGlassIcon, MegaphoneIcon, PencilSquareIcon, PuzzlePieceIcon, @@ -29,7 +32,11 @@ import { } from "@heroicons/react/24/outline"; import { BoltIcon, ChevronDownIcon, StarIcon } from "@heroicons/react/24/solid"; import { useMediaQuery } from "@site/src/hooks/use-media-query"; +import SearchBar from "@theme/SearchBar"; +import clsx from "clsx"; import React, { useState } from "react"; +import { DiscordLogo } from "../../../static/img/logos/discord"; +import { GitHubLogo } from "../../../static/img/logos/github"; // Santa Claus Icon Component const SantaIcon = ({ className }: { className?: string }) => ( @@ -63,12 +70,29 @@ const SantaIcon = ({ className }: { className?: string }) => ( /> ); -import { DiscordLogo } from "../../../static/img/logos/discord"; -import { GitHubLogo } from "../../../static/img/logos/github"; import { useGitHubStars } from "../../contexts/GitHubStarsContext"; import useCasesData from "../usecases/usecases.json"; import styles from "./styles.module.css"; +// Docs page tab configuration +const docTabs = [ + { label: "VoltAgent", href: "/docs/", match: "/docs/" }, + { label: "Observability", href: "/observability-docs/", match: "/observability-docs/" }, + { + label: "Actions & Triggers", + href: "/actions-triggers-docs/", + match: "/actions-triggers-docs/", + }, + { label: "Evaluation", href: "/evaluation-docs/", match: "/evaluation-docs/" }, + { + label: "Prompt Engineering", + href: "/prompt-engineering-docs/", + match: "/prompt-engineering-docs/", + }, + { label: "Deployment", href: "/deployment-docs/", match: "/deployment-docs/" }, + { label: "Recipes & Guides", href: "/recipes-and-guides/", match: "/recipes-and-guides/" }, +]; + export default function Navbar() { const [isMenuOpen, setIsMenuOpen] = useState(false); const [isProductsOpen, setIsProductsOpen] = useState(false); @@ -117,6 +141,112 @@ export default function Navbar() { } }; + // Check if current page is a docs page + const isDocsPage = + location.pathname.includes("/docs") || + location.pathname.includes("/observability-docs") || + location.pathname.includes("/evaluation-docs") || + location.pathname.includes("/prompt-engineering-docs") || + location.pathname.includes("/deployment-docs") || + location.pathname.includes("/actions-triggers-docs") || + location.pathname.startsWith("/recipes-and-guides/"); + + // Render docs navbar for documentation pages + if (isDocsPage) { + return ( + + ); + } + + // Default navbar for non-docs pages return (