diff --git a/.gitignore b/.gitignore index 9526bcb8cb..9e9ee3ff6c 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,4 @@ site/src/generated/ site/public/docs/ site/public/llms-full.txt site/public/llms.txt +site/.playwright-mcp/ diff --git a/frontend/packages/components/src/header/index.tsx b/frontend/packages/components/src/header/index.tsx index 02085026a0..b0a082072d 100644 --- a/frontend/packages/components/src/header/index.tsx +++ b/frontend/packages/components/src/header/index.tsx @@ -80,19 +80,19 @@ export function Header({ - + diff --git a/site/src/app/(v2)/[section]/[[...page]]/page.tsx b/site/src/app/(v2)/[section]/[[...page]]/page.tsx index 1cafcb7532..49b3f55a24 100644 --- a/site/src/app/(v2)/[section]/[[...page]]/page.tsx +++ b/site/src/app/(v2)/[section]/[[...page]]/page.tsx @@ -119,7 +119,7 @@ export default async function CatchAllCorePage({ params: { section, page } }) {
diff --git a/site/src/components/v2/Header.tsx b/site/src/components/v2/Header.tsx index ec16a510eb..e78df4ffec 100644 --- a/site/src/components/v2/Header.tsx +++ b/site/src/components/v2/Header.tsx @@ -7,7 +7,9 @@ import { Icon, faDiscord } from "@rivet-gg/icons"; import Image from "next/image"; import Link from "next/link"; import { type ReactNode, useEffect, useState } from "react"; -import { usePathname } from "next/navigation"; +import { usePathname, useRouter } from "next/navigation"; +import { Button, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@rivet-gg/components"; +import { faChevronDown } from "@rivet-gg/icons"; import { GitHubDropdown } from "./GitHubDropdown"; import { HeaderSearch } from "./HeaderSearch"; import { LogoContextMenu } from "./LogoContextMenu"; @@ -99,35 +101,23 @@ export function Header({ - - Rivet logo - - - } - subnav={subnav} - support={ -
- - - Sign In +
+ + + Rivet logo - - - Discord - - - Support - +
} + subnav={subnav} + support={null} links={
{variant === "full-width" && } @@ -200,33 +190,23 @@ export function Header({ subnav ? "pb-2 md:pb-0 md:pt-4" : "md:py-4", )} logo={ - - - Rivet logo - - - } - subnav={subnav} - support={ -
- - Sign In - - - Discord - - - Support - +
+ + + Rivet logo + +
} + subnav={subnav} + support={null} links={
@@ -275,43 +255,70 @@ export function Header({ function DocsMobileNavigation({ tree }) { const pathname = usePathname() || ""; + const router = useRouter(); + const isDocsPage = pathname.startsWith("/docs"); - const docsLinks = [ - { href: "/docs/actors", label: "Actors" }, + // Determine current section based on pathname + const getCurrentSection = () => { + if (pathname.startsWith("/docs/actors")) return "actors"; + if (pathname.startsWith("/docs/integrations")) return "integrations"; + if (pathname.startsWith("/docs/api")) return "api"; + return "overview"; + }; + + const sections = [ + { id: "overview", label: "Overview", href: "/docs" }, + { id: "actors", label: "Actors", href: "/docs/actors" }, + { id: "integrations", label: "Integrations", href: "/docs/integrations" }, + { id: "api", label: "API Reference", href: "/docs/api" }, ]; - const otherLinks = [ + const mainLinks = [ + { href: "/docs", label: "Documentation" }, { href: "/changelog", label: "Changelog" }, { href: "/pricing", label: "Pricing" }, ]; - return ( -
- {/* Docs section */} -
Documentation
-
- {docsLinks.map(({ href, label }) => ( -
- - - {label} - - -
- ))} -
+ const currentSection = sections.find(s => s.id === getCurrentSection()); - {/* Other links */} - {otherLinks.map(({ href, external, label }) => ( - - - {label} - - + return ( +
+ {/* Main navigation links */} + {mainLinks.map(({ href, label }) => ( + + {label} + ))} + + {/* Separator and docs content */} + {isDocsPage && ( + <> +
+ + {/* Section dropdown */} + + + + + + {sections.map(({ id, label, href }) => ( + router.push(href)} + > + {label} + + ))} + + + + {/* Tree/sidebar content */} + {tree &&
{tree}
} + + )}
); } diff --git a/site/src/content/docs/deploy/vercel.mdx b/site/src/content/docs/deploy/vercel.mdx index f173bc5e8d..b41e3e6b2d 100644 --- a/site/src/content/docs/deploy/vercel.mdx +++ b/site/src/content/docs/deploy/vercel.mdx @@ -1,12 +1,12 @@ import { InstallPackage } from "@/components/docs/InstallPackage"; -import { faGitHub } from "@rivet-gg/icons"; +import { faGithub } from "@rivet-gg/icons"; # Deploying to Vercel Deploy your Next.js + RivetKit app to [Vercel](https://vercel.com/). - + Complete example Next.js + RivetKit app. diff --git a/site/src/content/docs/index.mdx b/site/src/content/docs/index.mdx index 3a68c0709c..344354a167 100644 --- a/site/src/content/docs/index.mdx +++ b/site/src/content/docs/index.mdx @@ -23,7 +23,7 @@ Rivet is a library for long-lived processes with durable state, realtime, and sc - **Elastic Scalability**: Scale from zero to millions without cold starts - **Multi-Region Durable Storage**: Keep state & operations near your users or comply with data soveirgnty -## Tools +## Libraries diff --git a/site/src/sitemap/mod.ts b/site/src/sitemap/mod.ts index 071090d54d..76fbe7a03f 100644 --- a/site/src/sitemap/mod.ts +++ b/site/src/sitemap/mod.ts @@ -122,7 +122,7 @@ export const sitemap = [ // TOOD: These are product pages // - https://tanstack.com/query/latest // - https://docs.restate.dev/use-cases/ai-agents - title: "Tools", + title: "Libraries", pages: [ { title: "Actors", href: "/docs/tools/actors", icon: faActorsBorderless }, // { title: "Workflows", href: "/docs/what-are-workflows", },