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

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from DeadantCo/answerLoopsdev

All issues in DeadantCo/answerLoopsdev

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.