Docs plugin: velite content pipeline + read-only API

未关闭
#446 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start with the plugin template and the repository's beforeCompile escape hatch described in the issue, then read the authored config and existing oRPC handler conventions. Implementing this spans content compilation, API routes, plugin registration, and deploy behavior; the issue says it is blocked by #445. Done means the listed build, API, OpenAPI/MCP, and no-DB/no-secrets acceptance criteria pass.

由索引模型根据 Issue 内容生成。

描述

ready-for-agent

Parent

#444

What to build

The docs plugin end to end on the read path: scaffolded from the template, a Velite content pipeline that compiles the repository's docs at build time, and a read-only oRPC router serving the compiled content. Users (and agents, via OpenAPI/MCP) can list and read the repo's documentation through the API.

  • velite.config.ts compiles docs/** and GLOSSARY.md (markdown format, raw body kept for client render; zod frontmatter: title, description, tags, order) — velite runs from a rspack beforeCompile hook appended via the ticket #1 escape hatch, so no hand-run velite step in dev or build
  • listPublished (paginated, tag/search filter) and getBySlug oRPC routes serve the compiled JSON; compiled content imports into the plugin source so the bundle is self-contained
  • Registered in the authored config with a UI mount; no database, no secrets
  • Handlers follow the repo convention: .effect() generators, services via yield* Tag, typed error shapes

Blocked by: #445

Acceptance criteria

  • every-plugin build (and the deploy train) compiles content with no manual velite invocation; the velite output directory is gitignored
  • GET /api/rpc/docs/listPublished returns the repository's docs with pagination metadata
  • GET /api/rpc/docs/getBySlug returns a real ADR or glossary entry's raw markdown + metadata
  • The docs routes appear in the OpenAPI spec and MCP tools
  • Plugin definition carries no DB layer and no secrets
主要语言
TypeScript
星标
5
派生
4
平均合并
9 小时 52 分钟
30 天内合并 PR
222

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

NEARBuilders/everything-dev 的其他 Issue

查看 NEARBuilders/everything-dev 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。