diff --git a/docs/search.md b/docs/search.md index dcad0851..15367120 100644 --- a/docs/search.md +++ b/docs/search.md @@ -36,6 +36,7 @@ Chrome elements (navbar, footer, CTA banner, newsletter signup) have `data-pagef - **Multi-word queries** default to phrase search (wrapped in quotes); falls back to OR search if no phrase results - **Single-word queries** use standard search - Results show title, content type badge, and highlighted excerpt +- Content type badges: `article` (articles), `story` (member stories), `research` (policy & research papers), `page` (everything else) ## Testing Locally diff --git a/src/components/react/search-dialog.tsx b/src/components/react/search-dialog.tsx index 02bda92a..32274b6e 100644 --- a/src/components/react/search-dialog.tsx +++ b/src/components/react/search-dialog.tsx @@ -5,6 +5,7 @@ import { FileText, BookOpen, Newspaper, + ScrollText, Loader2, } from "lucide-react"; import { useState, useEffect, useRef, useCallback } from "react"; @@ -35,12 +36,14 @@ interface PagefindAPI { const contentTypeIcons: Record = { article: Newspaper, story: BookOpen, + research: ScrollText, page: FileText, }; function getContentType(url: string): string { if (url.startsWith("/articles/")) return "article"; if (url.startsWith("/stories/")) return "story"; + if (url.startsWith("/policy/research/")) return "research"; return "page"; } @@ -174,7 +177,7 @@ export default function SearchDialog() { setQuery(e.target.value)} className="flex-1 bg-transparent text-base text-primary-dark outline-none placeholder:text-gray-dark" @@ -266,7 +269,7 @@ export default function SearchDialog() { Search - Search articles, stories, and pages on the Green Software Foundation + Search articles, research, stories, and pages on the Green Software Foundation website.