Docs search: let pages declare tags so related searches find them

Offen
#119 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript

Rechercherichtung

Start with the search endpoint in app/docs/api/search/route.ts and the docs frontmatter schema in source.config.ts, where the blog's optional tags list shows the pattern to follow. Check how the search index is built and whether it can weight tags above body text. Done means a page is found by a tag that does not appear in its body, existing pages still validate, and pnpm test and pnpm build pass.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

documentation enhancement frontend help wanted

Copied from DeadantCo/answerLoops#109 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/480 — originally opened by @NathanTarbert on 2026-10-26

Problem

Docs search matches page titles and body text, but nothing else. Someone searching "webhook", "SSO" or "Ollama" gets results ordered only by where the word happens to appear, and a page can't say what else it should be found for. A visitor looking for "self-host" or "Docker" can miss the right page because it uses different words.

Where

  • app/docs/api/search/route.ts serves the search (built on Fumadocs' createFromSource).
  • source.config.ts defines the docs frontmatter schema.
  • The blog already has an optional tags list in its frontmatter (source.config.ts), which is a pattern to follow.

Suggested approach

  1. Add an optional tags field (a list of strings) to the docs frontmatter schema.
  2. Include the tags in the search index so they influence matching, and check whether the search library supports weighting them above body text.
  3. Add useful tags to the pages people search for most (the integrations, self-hosting and billing pages first).
  4. Check the result list shows enough context to tell similar pages apart.

Acceptance criteria

  • Docs frontmatter accepts an optional tags list, and existing pages still validate.
  • A search for a tag that doesn't appear in a page's body still finds that page.
  • At least the top 15 most-visited pages have sensible tags.
  • A test covers the search route returning a page by tag.
  • pnpm test and pnpm build pass.

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

Vorherrschende Sprache
TypeScript
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus DeadantCo/answerLoopsdev

Alle Issues in DeadantCo/answerLoopsdev

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.