diff --git a/web/app/blog/layout.tsx b/web/app/blog/layout.tsx index 0c3dca8f8285..ce32f825029b 100644 --- a/web/app/blog/layout.tsx +++ b/web/app/blog/layout.tsx @@ -1,5 +1,7 @@ import type { Metadata } from "next"; import { SiteHeader } from "../components/site-header"; +import { BlogPager } from "../components/blog-pager"; +import { BlogCTA } from "../components/blog-cta"; export const metadata: Metadata = { title: { @@ -25,6 +27,8 @@ export default function BlogLayout({
{children}
+ +
); diff --git a/web/app/blog/page.tsx b/web/app/blog/page.tsx index 81a0a6abc69a..0462e1a2f215 100644 --- a/web/app/blog/page.tsx +++ b/web/app/blog/page.tsx @@ -1,48 +1,18 @@ import type { Metadata } from "next"; import Link from "next/link"; +import { blogPosts } from "../components/blog-posts"; export const metadata: Metadata = { title: "Blog", description: "News and updates from the cmux team", }; -const posts = [ - { - slug: "cmd-shift-u", - title: "Cmd+Shift+U", - date: "2026-03-04", - summary: - "How Cmd+Shift+U navigates between finished agents across workspaces in cmux.", - }, - { - slug: "zen-of-cmux", - title: "The Zen of cmux", - date: "2026-02-27", - summary: - "cmux is a primitive, not a solution. It gives you composable pieces and your workflow is up to you.", - }, - { - slug: "show-hn-launch", - title: "Launching cmux on Show HN", - date: "2026-02-21", - summary: - "cmux hit #2 on Hacker News, got shared by Mitchell Hashimoto, and went viral in Japan.", - }, - { - slug: "introducing-cmux", - title: "Introducing cmux", - date: "2026-02-12", - summary: - "A native macOS terminal built on Ghostty, designed for running multiple AI coding agents side by side.", - }, -]; - export default function BlogPage() { return ( <>

Blog

-
- {posts.map((post) => ( +
+ {blogPosts.map((post) => (
-
- - -
); } diff --git a/web/app/components/blog-cta.tsx b/web/app/components/blog-cta.tsx new file mode 100644 index 000000000000..2c57459e1d5f --- /dev/null +++ b/web/app/components/blog-cta.tsx @@ -0,0 +1,20 @@ +"use client"; + +import { usePathname } from "next/navigation"; +import { DownloadButton } from "./download-button"; +import { GitHubButton } from "./github-button"; + +export function BlogCTA() { + const pathname = usePathname(); + if (pathname === "/blog") return null; + + const slug = pathname.replace("/blog/", ""); + const location = `blog-${slug}`; + + return ( +
+ + +
+ ); +} diff --git a/web/app/components/blog-pager.tsx b/web/app/components/blog-pager.tsx new file mode 100644 index 000000000000..b895a75c9f65 --- /dev/null +++ b/web/app/components/blog-pager.tsx @@ -0,0 +1,43 @@ +"use client"; + +import Link from "next/link"; +import { usePathname } from "next/navigation"; +import { blogPosts } from "./blog-posts"; + +export function BlogPager() { + const pathname = usePathname(); + const index = blogPosts.findIndex( + (post) => `/blog/${post.slug}` === pathname + ); + const prev = index > 0 ? blogPosts[index - 1] : null; + const next = index < blogPosts.length - 1 ? blogPosts[index + 1] : null; + + if (!prev && !next) return null; + + return ( + + ); +} diff --git a/web/app/components/blog-posts.ts b/web/app/components/blog-posts.ts new file mode 100644 index 000000000000..3cfdff15007c --- /dev/null +++ b/web/app/components/blog-posts.ts @@ -0,0 +1,30 @@ +export const blogPosts = [ + { + slug: "cmd-shift-u", + title: "Cmd+Shift+U", + date: "2026-03-04", + summary: + "How Cmd+Shift+U navigates between finished agents across workspaces in cmux.", + }, + { + slug: "zen-of-cmux", + title: "The Zen of cmux", + date: "2026-02-27", + summary: + "cmux is a primitive, not a solution. It gives you composable pieces and your workflow is up to you.", + }, + { + slug: "show-hn-launch", + title: "Launching cmux on Show HN", + date: "2026-02-21", + summary: + "cmux hit #2 on Hacker News, got shared by Mitchell Hashimoto, and went viral in Japan.", + }, + { + slug: "introducing-cmux", + title: "Introducing cmux", + date: "2026-02-12", + summary: + "A native macOS terminal built on Ghostty, designed for running multiple AI coding agents side by side.", + }, +]; diff --git a/web/app/components/github-button.tsx b/web/app/components/github-button.tsx index 9cee9aaa43ec..585e9747a9c3 100644 --- a/web/app/components/github-button.tsx +++ b/web/app/components/github-button.tsx @@ -2,13 +2,13 @@ import posthog from "posthog-js"; -export function GitHubButton() { +export function GitHubButton({ location = "hero" }: { location?: string }) { return ( posthog.capture("cmuxterm_github_clicked", { location: "hero" })} + onClick={() => posthog.capture("cmuxterm_github_clicked", { location })} className="inline-flex items-center whitespace-nowrap gap-2 rounded-full border border-border px-5 py-2.5 text-[15px] font-medium text-foreground hover:bg-code-bg transition-colors" >