Skip to content

Commit 126ac97

Browse files
authored
docs(readme): 改为插件总览卡片并把维护说明移到 CONTRIBUTING (#15)
- README 按索引生成插件卡片(图标、作者、版本、API、分类、平台、stars、标签) - 新增 scripts/render-readme.mjs 及测试,validate 检查 README 与索引一致 - track-releases 追踪到新版本时同时更新 README - 索引原理、官方/社区对比、文档表、仓库结构、本地校验移到 CONTRIBUTING.md - 新增无图标插件使用的默认图标 assets/plugin-default.svg
1 parent 121d323 commit 126ac97

7 files changed

Lines changed: 293 additions & 58 deletions

File tree

‎.github/workflows/track-releases.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
args=""
5050
if [ -n "$PLUGIN" ]; then args="--plugin $PLUGIN"; fi
5151
node scripts/track-releases.mjs lithe-plugin-index.json $args
52+
node scripts/render-readme.mjs
5253
5354
- name: Verify the new archives
5455
if: steps.track.outputs.added != '0'
@@ -62,7 +63,7 @@ jobs:
6263
git config user.name "lithe-store-bot"
6364
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
6465
git switch -C "$BRANCH"
65-
git add lithe-plugin-index.json
66+
git add lithe-plugin-index.json README.md
6667
git commit -m "chore(index): track new plugin releases" -m "$SUMMARY"
6768
git push --force origin "$BRANCH"
6869
body=$(printf '自动追踪到新的插件版本:\n\n%s\n\n已校验 SHA-256 与包内 plugin.json(id、version、pluginAPIVersion、signatureRequirement)。维护者请按 docs/maintainers.md 的清单审查后合并。' "$(echo "$SUMMARY" | tr ',' '\n' | sed 's/^ */- /')")

‎.github/workflows/validate.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: Validate index
3838
run: node scripts/validate-index.mjs lithe-plugin-index.json
3939

40+
- name: Check the README plugin overview
41+
run: node scripts/render-readme.mjs --check
42+
4043
- name: Pick the base index
4144
id: base
4245
run: |

‎CONTRIBUTING.md‎

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| --- | --- |
55
| 收录自己的插件 | 读 [docs/publishing.md](docs/publishing.md),提 PR 或开“插件收录申请” issue |
66
| 发布插件新版本 | 在自己仓库发布 Release 即可,bot 会自动开 PR(见 [发布新版本](docs/publishing.md#4-发布新版本)) |
7-
| 修改插件信息 | 提 PR 修改 `lithe-plugin-index.json` 中自己的条目 |
7+
| 修改插件信息 | 提 PR 修改 `lithe-plugin-index.json` 中自己的条目,并运行 `node scripts/render-readme.mjs` 更新 README |
88
| 报告有问题的插件 | 开“报告插件问题” issue;安全问题请勾选“安全问题”,维护者会优先处理 |
99
| 改进脚本、CI 或文档 | 直接提 PR,并运行 `node --test scripts/store.test.mjs` |
1010

@@ -13,10 +13,65 @@
1313
- 一个 PR 只改一个插件,便于审查和回退。
1414
- `plugins` 按 `id` 字母序排列;每个插件的 `versions` 新版本在前。
1515
- 不修改已发布版本的 `downloadURL` 与 `sha256`;不删除历史版本(撤回问题版本除外)。
16+
- 修改索引后运行 `node scripts/render-readme.mjs`,README 的插件总览由它生成,CI 会检查两者是否一致。
1617
- 插件的 bug 与功能请求请提到插件自己的仓库,本仓库只处理收录相关事务。
1718

1819
第一次开发语言插件,先读[LSP 插件完整生命周期](docs/lsp-plugin-lifecycle.md),
1920
再按[构建、运行与测试接入指南](docs/build-tool-integration.md)扩展能力,
2021
最后按[发布文档](docs/publishing.md)提交收录。
2122

2223
审查标准见 [docs/maintainers.md](docs/maintainers.md#审查清单)。
24+
25+
## 索引如何工作
26+
27+
这个仓库只存放一份索引文件 [`lithe-plugin-index.json`](lithe-plugin-index.json),列出社区插件、
28+
它们的版本和每个平台的下载包;插件代码和安装包都留在各自作者的 GitHub 仓库里,通过 GitHub Releases 分发。
29+
30+
Lithe 会把仓库地址 `https://github.com/Lithe-IDEA/Lithe-store` 解析为
31+
`https://raw.githubusercontent.com/Lithe-IDEA/Lithe-store/HEAD/lithe-plugin-index.json`,
32+
索引缓存在本机缓存目录,不会写入应用安装包。
33+
34+
## 社区插件与官方插件
35+
36+
| | 官方插件 | 社区插件(本仓库) |
37+
| --- | --- | --- |
38+
| 索引位置 | Lithe 主仓库 `Plugins/marketplace/index.json`,随应用附带 | 本仓库,Lithe 预置为社区插件源(用户可停用或移除) |
39+
| ID 命名空间 | `dev.lithe.*` | 不得使用 `dev.lithe.*`,Lithe 会直接拒绝 |
40+
| 完整性 | Lithe 发布者 Ed25519 签名 | 索引固定每个包的 SHA-256,安装后记录内容摘要并在每次加载时复查 |
41+
| 安装前 | 直接安装 | 弹窗列出权限、要运行的程序和来源仓库,用户确认后安装 |
42+
43+
社区插件**由各自的开发者维护**。本仓库的审查只保证:索引格式正确、下载包与 SHA-256 一致、
44+
包内 `plugin.json` 与索引条目一致、来源仓库真实存在且公开。它不代表对插件代码的安全审计。
45+
46+
## 文档
47+
48+
| 文档 | 内容 |
49+
| --- | --- |
50+
| [LSP 插件完整生命周期](docs/lsp-plugin-lifecycle.md) | 从 Lua 模板开始:清单、服务器打包、激活、状态目录、停止、升级与卸载 |
51+
| [构建、运行与测试接入](docs/build-tool-integration.md) | 可用的执行提供者示例、工程后端边界,以及开发中的 API 3 状态 |
52+
| [docs/publishing.md](docs/publishing.md) | 插件作者:如何打包、发布 Release、提交收录和发布新版本 |
53+
| [docs/versioning-and-updates.md](docs/versioning-and-updates.md) | 版本号如何追踪、Lithe 如何选择可安装版本、用户如何更新/回退 |
54+
| [docs/maintainers.md](docs/maintainers.md) | 维护者:审查清单、下架与撤回、同步 Lithe 契约 |
55+
56+
## 仓库结构
57+
58+
```text
59+
lithe-plugin-index.json # 唯一的数据文件,Lithe 客户端读取它
60+
schema/plugin-index.schema.json # 索引 JSON Schema(Lithe 契约 v1 的副本)
61+
scripts/validate-index.mjs # 与 Lithe Rust Core 同规则的校验 + 下载包校验
62+
scripts/track-releases.mjs # 追踪已收录插件的新 Release 并生成版本条目
63+
scripts/render-readme.mjs # 根据索引生成 README 的插件总览
64+
scripts/store.test.mjs # 校验脚本的测试(fixtures 复制自 Lithe 主仓库)
65+
assets/ # README 用到的图片(无图标插件的默认图标)
66+
.github/workflows/ # validate(PR/推送/每周)与 track-releases(每 6 小时)
67+
```
68+
69+
## 本地校验
70+
71+
需要 Node.js 22+ 与 `unzip`:
72+
73+
```bash
74+
node --test scripts/store.test.mjs
75+
node scripts/validate-index.mjs --verify-archives
76+
node scripts/render-readme.mjs --check
77+
```

‎README.md‎

Lines changed: 80 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,93 @@
1-
# Lithe Store
1+
<div align="center">
22

3-
Lithe 的**社区插件市场索引**。这个仓库只存放一份索引文件
4-
[`lithe-plugin-index.json`](lithe-plugin-index.json),列出社区插件、它们的版本和每个平台的下载包;
5-
插件代码和安装包都留在各自作者的 GitHub 仓库里,通过 GitHub Releases 分发。
3+
<img src="assets/plugin-default.svg" width="72" alt="Lithe Store">
64

7-
> English: This repository is the community plugin index for [Lithe](https://github.com/Lithe-IDEA/Lithe-IDEA).
8-
> Plugin authors publish archives in their own GitHub Releases; this index pins each archive's SHA-256.
9-
> See [docs/publishing.md](docs/publishing.md) to list a plugin.
10-
11-
## 在 Lithe 中使用
12-
13-
需要 Lithe 0.6.1 或更新版本(目前插件市场只在 macOS 提供)。Lithe 已预置本仓库作为社区插件源,
14-
打开 **设置 → 插件 → 插件市场** 即可浏览、安装社区插件,不需要额外配置。
15-
16-
如果你之前移除了 Lithe Store,可以重新添加:
5+
<h1>Lithe Store</h1>
176

18-
1. 打开 **设置 → 插件 → ⚙ → 管理插件仓库…**
19-
2. 添加 `https://github.com/Lithe-IDEA/Lithe-store`
20-
3. 回到 **插件市场** 标签
7+
<p><strong><a href="https://github.com/Lithe-IDEA/Lithe-IDEA">Lithe</a> 的社区插件市场</strong></p>
218

22-
Lithe 会把仓库地址解析为
23-
`https://raw.githubusercontent.com/Lithe-IDEA/Lithe-store/HEAD/lithe-plugin-index.json`,
24-
索引缓存在本机缓存目录,不会写入应用安装包。
9+
<p>
10+
<a href="#-插件总览"><b>🧩 浏览插件</b></a> ·
11+
<a href="#️-在-lithe-中安装"><b>⬇️ 安装方式</b></a> ·
12+
<a href="docs/publishing.md"><b>📤 发布插件</b></a> ·
13+
<a href="CONTRIBUTING.md"><b>🤝 参与贡献</b></a>
14+
</p>
2515

26-
## 社区插件与官方插件
16+
</div>
2717

28-
| | 官方插件 | 社区插件(本仓库) |
29-
| --- | --- | --- |
30-
| 索引位置 | Lithe 主仓库 `Plugins/marketplace/index.json`,随应用附带 | 本仓库,Lithe 预置为社区插件源(用户可停用或移除) |
31-
| ID 命名空间 | `dev.lithe.*` | 不得使用 `dev.lithe.*`,Lithe 会直接拒绝 |
32-
| 完整性 | Lithe 发布者 Ed25519 签名 | 索引固定每个包的 SHA-256,安装后记录内容摘要并在每次加载时复查 |
33-
| 安装前 | 直接安装 | 弹窗列出权限、要运行的程序和来源仓库,用户确认后安装 |
34-
35-
社区插件**由各自的开发者维护**。本仓库的审查只保证:索引格式正确、下载包与 SHA-256 一致、
36-
包内 `plugin.json` 与索引条目一致、来源仓库真实存在且公开。它不代表对插件代码的安全审计。
37-
38-
## 文档
18+
> English: Community plugin index for [Lithe](https://github.com/Lithe-IDEA/Lithe-IDEA).
19+
> Plugins live in their authors' repositories; this index pins every archive's SHA-256.
20+
> See [docs/publishing.md](docs/publishing.md) to list a plugin.
3921
40-
| 文档 | 内容 |
41-
| --- | --- |
42-
| [LSP 插件完整生命周期](docs/lsp-plugin-lifecycle.md) | 从 Lua 模板开始:清单、服务器打包、激活、状态目录、停止、升级与卸载 |
43-
| [构建、运行与测试接入](docs/build-tool-integration.md) | 可用的执行提供者示例、工程后端边界,以及开发中的 API 3 状态 |
44-
| [docs/publishing.md](docs/publishing.md) | 插件作者:如何打包、发布 Release、提交收录和发布新版本 |
45-
| [docs/versioning-and-updates.md](docs/versioning-and-updates.md) | 版本号如何追踪、Lithe 如何选择可安装版本、用户如何更新/回退 |
46-
| [docs/maintainers.md](docs/maintainers.md) | 维护者:审查清单、下架与撤回、同步 Lithe 契约 |
47-
| [CONTRIBUTING.md](CONTRIBUTING.md) | 参与方式总览 |
22+
## 🧩 插件总览
23+
24+
社区插件**由各自的开发者维护**。收录审查只核对索引格式、下载包 SHA-256 和包内清单,**不代表对插件代码做过安全审计**,安装前请先看代码。
25+
插件本身的问题请提到插件自己的仓库。
26+
27+
<!-- plugins:start (generated by scripts/render-readme.mjs, do not edit) -->
28+
29+
**全部 · 5** | 语言支持 · 3 | 构建工具 · 2
30+
31+
<table>
32+
<tr>
33+
<td width="50%" valign="top">
34+
<h3><img src="assets/plugin-default.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-go">Go Support</a></h3>
35+
<p><sub>Lithe Community · v0.1.0 · API 1</sub></p>
36+
<p>使用你自己安装的 gopls 提供 Go 补全、跳转定义和错误提示,并支持运行 main 包和 go test(整个模块、单个文件所在的包或单个测试函数)。需要先安装 Go 和 gopls(go install gola…</p>
37+
<p>🏷️ 语言支持 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-go?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
38+
<p><code>language</code> <code>go</code></p>
39+
</td>
40+
<td width="50%" valign="top">
41+
<h3><img src="https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-gradle/88a86cae73403d715d1385e447d8e4a9273e8f2f/io.github.lithe-idea.gradle-build/icons/gradle.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-gradle">Gradle</a></h3>
42+
<p><sub>Lithe Community · v0.1.1 · API 3(需 buildSystems)</sub></p>
43+
<p>预发布 Gradle 集成:项目与任务树、JavaExec 运行入口、筛选测试、编译诊断及依赖树。需要支持 API 3 buildSystems 和原生构建窗口的 Lithe preview 开发版、Gradle 7.6…</p>
44+
<p>🏷️ 构建工具 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-gradle?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
45+
<p><code>build</code> <code>gradle</code> <code>java</code> <code>testing</code></p>
46+
</td>
47+
</tr>
48+
<tr>
49+
<td width="50%" valign="top">
50+
<h3><img src="assets/plugin-default.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-lua">Lua Support</a></h3>
51+
<p><sub>Lithe Community · v0.3.0 · API 1</sub></p>
52+
<p>内置 lua-language-server(LuaLS)提供 Lua 补全、跳转定义和错误提示,无需另外安装;“运行当前文件”使用你自己的 lua(brew install lua)。</p>
53+
<p>🏷️ 语言支持 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-lua?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
54+
<p><code>language</code> <code>lua</code></p>
55+
</td>
56+
<td width="50%" valign="top">
57+
<h3><img src="https://raw.githubusercontent.com/Lithe-IDEA/lithe-plugin-maven/177ee4e9b12b9fe06a07498eb316539f7472d5d8/io.github.lithe-idea.maven-build/icons/maven.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-maven">Maven</a></h3>
58+
<p><sub>Lithe Community · v0.1.0 · API 3(需 buildSystems)</sub></p>
59+
<p>预发布 Maven 集成:反应堆与目标树、Profiles、带 JUnit 报告的筛选测试、编译诊断及依赖树。附带只读 Maven 核心扩展;需要支持 API 3 buildSystems 和原生构建窗口的 Lithe…</p>
60+
<p>🏷️ 构建工具 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-maven?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
61+
<p><code>build</code> <code>maven</code> <code>java</code> <code>testing</code></p>
62+
</td>
63+
</tr>
64+
<tr>
65+
<td width="50%" valign="top">
66+
<h3><img src="assets/plugin-default.svg" width="28" height="28" alt=""> <a href="https://github.com/Lithe-IDEA/lithe-plugin-php">PHP Support</a></h3>
67+
<p><sub>Lithe Community · v0.1.0 · API 1</sub></p>
68+
<p>使用你自己安装的 Intelephense 提供 PHP 补全、跳转定义和错误提示,并支持运行 PHP 文件和 PHPUnit 测试。插件不内置 Intelephense(其许可证不允许再分发),请用 npm insta…</p>
69+
<p>🏷️ 语言支持 · 💻 macOS · <img src="https://img.shields.io/github/stars/Lithe-IDEA/lithe-plugin-php?style=flat&label=stars&logo=github" alt="GitHub stars"></p>
70+
<p><code>language</code> <code>php</code></p>
71+
</td>
72+
<td width="50%"></td>
73+
</tr>
74+
</table>
75+
76+
<!-- plugins:end -->
77+
78+
## ⬇️ 在 Lithe 中安装
4879

49-
## 仓库结构
80+
需要 Lithe 0.6.1 或更新版本(目前插件市场只在 macOS 提供)。Lithe 已预置本仓库作为社区插件源,
81+
打开 **设置 → 插件 → 插件市场** 即可浏览和安装;安装前会弹窗列出插件权限、要运行的程序和来源仓库。
5082

51-
```text
52-
lithe-plugin-index.json # 唯一的数据文件,Lithe 客户端读取它
53-
schema/plugin-index.schema.json # 索引 JSON Schema(Lithe 契约 v1 的副本)
54-
scripts/validate-index.mjs # 与 Lithe Rust Core 同规则的校验 + 下载包校验
55-
scripts/track-releases.mjs # 追踪已收录插件的新 Release 并生成版本条目
56-
scripts/store.test.mjs # 校验脚本的测试(fixtures 复制自 Lithe 主仓库)
57-
.github/workflows/ # validate(PR/推送/每周)与 track-releases(每 6 小时)
58-
```
83+
如果之前移除了 Lithe Store,在 **设置 → 插件 → ⚙ → 管理插件仓库…** 中重新添加
84+
`https://github.com/Lithe-IDEA/Lithe-store` 即可。
5985

60-
本地校验(需要 Node.js 22+ 与 `unzip`):
86+
## 🤝 参与贡献
6187

62-
```bash
63-
node --test scripts/store.test.mjs
64-
node scripts/validate-index.mjs --verify-archives
65-
```
88+
想收录自己的插件、发布新版本或报告有问题的插件,请看 [CONTRIBUTING.md](CONTRIBUTING.md)。
89+
上方的插件总览由 `scripts/render-readme.mjs` 根据 [`lithe-plugin-index.json`](lithe-plugin-index.json) 生成,修改索引后运行一次即可。
6690

67-
## 许可
91+
## 📄 许可
6892

69-
本仓库的脚本与文档使用 [Apache-2.0](LICENSE)。索引中每个插件的许可以该条目的 `license` 字段为准。
93+
本仓库的脚本与文档使用 [Apache-2.0](LICENSE)。每个插件的许可以索引条目的 `license` 字段为准。

‎assets/plugin-default.svg‎

Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)