Skip to content

fix: show page title as primary search result label#975

Merged
teallarson merged 1 commit into
mainfrom
fix/search-result-page-title
May 22, 2026
Merged

fix: show page title as primary search result label#975
teallarson merged 1 commit into
mainfrom
fix/search-result-page-title

Conversation

@teallarson
Copy link
Copy Markdown
Contributor

@teallarson teallarson commented May 20, 2026

BEFORE:
Screenshot 2026-05-22 at 2 52 00 PM

AFTER:
Screenshot 2026-05-22 at 2 51 54 PM

Summary

  • Search results currently surface the deepest matched heading (e.g. --api-key, -k) as the prominent title and bury the page title in the breadcrumb above.
  • This flips it: lvl0 (page title) is now the main title, and the section path (lvl1 → deeper) is rendered as a subtitle beneath it.
  • Snippet/content rendering is unchanged.

Test plan

  • Open the search modal in the preview deployment and confirm hits display the page title as the bold/primary line.
  • Confirm the section path appears as a smaller subtitle below, with separators when nested.
  • Verify the matched term highlights correctly when it lands in the page title, a section heading, or content body.
  • Verify legacy flat records (with title/description) still render correctly.

🤖 Generated with Claude Code


Note

Low Risk
Low risk UI-only change to Algolia hit rendering; main risk is mismatched highlighting/labels for nonstandard DocSearch records.

Overview
Updates Algolia search hit rendering so the primary title line always shows the page title (hierarchy.lvl0) instead of the deepest matched heading.

Replaces the old breadcrumb-above-title with a subtitle section path (lvl1lvl5) rendered beneath the title using Highlight, keeping content snippets/legacy title+description fallbacks intact.

Reviewed by Cursor Bugbot for commit 375ef7c. Bugbot is set up for automated code reviews on this repo. Configure here.

Search results were displaying the deepest matched heading (e.g. a
subsection like "--api-key, -k") as the prominent title, with the page
title buried in the breadcrumb above. Flip the hierarchy: lvl0 (page
title) becomes the main title, and the section path (lvl1 onward) is
rendered as a subtitle beneath it.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment May 20, 2026 4:09pm

Request Review

Copy link
Copy Markdown
Contributor

@sdserranog sdserranog left a comment

Choose a reason for hiding this comment

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

hell yeah, I hated having to scroll to find an MCP server with an exact name.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants