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

Đang mở
#119 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
documentation, search

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của DeadantCo/answerLoopsdev

Tất cả issue của DeadantCo/answerLoopsdev

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.