Skip to content

docs: add section eyebrow text above page H1#45

Merged
rachaelrenk merged 2 commits into
mainfrom
docs/migration-ff/page-headers
May 8, 2026
Merged

docs: add section eyebrow text above page H1#45
rachaelrenk merged 2 commits into
mainfrom
docs/migration-ff/page-headers

Conversation

@rachaelrenk
Copy link
Copy Markdown
Contributor

Summary

Add a section eyebrow label above the H1 on every docs page to orient readers who land directly from search.

Problem

When readers arrive on a docs page from Google or an AI engine, there's no visible section context in the main content area. The sidebar shows where you are, but it's not prominent. GitBook had breadcrumb-style section context above the title; the Starlight migration lost this.

Fix

Added a small uppercase eyebrow label (e.g. "TERMINAL", "AGENTS", "ENTERPRISE") above the H1 in CustomPageTitle.astro. The label is derived from the current sidebar topic via the same starlightSidebarTopics middleware that powers WarpTopicNav.astro.

Visual treatment

  • Font: var(--sl-text-xs) (13px), weight 600, uppercase, 0.08em letter-spacing
  • Color: var(--sl-color-text-accent) (accent blue, theme-aware)
  • Matches the sidebar tier-1 section label treatment
  • Only renders when a topic is matched (graceful fallback)

Layout

  • Eyebrow sits above the H1, replacing the H1's top margin
  • Page header now reads: eyebrow -> H1 -> subtitle (description)

Context

Part of the docs v2 bug bash follow-up work. Tracks to Notion item: Migration FF: page headers.

Co-Authored-By: Oz oz-agent@warp.dev

Show the current topic label (e.g. TERMINAL, AGENTS, ENTERPRISE)
as a small uppercase eyebrow above the H1 on every page. Helps
orient readers who land directly from search without sidebar context.

Derived from starlightSidebarTopics middleware (same data as the
header topic nav). Styled with accent blue, xs font, 600 weight,
and 0.08em letter-spacing matching the sidebar tier-1 treatment.

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 8, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 8, 2026 10:17pm

Request Review

@rachaelrenk rachaelrenk self-assigned this May 8, 2026
Walk the sidebar tree to find the immediate parent group of the
current page and show it as a breadcrumb: 'AGENTS > THIRD-PARTY
CLI AGENTS' instead of just 'AGENTS'. Falls back to topic-only
when the page is at the top level of its topic. Truncated to 2
levels max to keep the eyebrow short.

Co-Authored-By: Oz <oz-agent@warp.dev>
Copy link
Copy Markdown
Collaborator

@hongyi-chen hongyi-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! looks good

Image

@rachaelrenk rachaelrenk merged commit b21dd18 into main May 8, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants