search-results.tsx

src/components/search/search-results.tsx
import { Fragment } from 'react'
import Link from 'next/link'
import Highlighter from 'react-highlight-words'
import {
type AutocompleteApi,
type AutocompleteCollection,
} from '@algolia/autocomplete-core'
import { type Result } from './search-client'
/**
* Extract context around the search query from content
* @param content - The full content text
* @param query - The search query
* @param contextLength - Number of characters to show on each side
* @returns Excerpt with query in context, or beginning of content
*/
function getContextExcerpt(
content: string,
query: string,

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC