release v0.2.1

This commit is contained in:
Kinneyzhang 2026-10-02 14:28:53 +08:00
parent fbe9b9914c
commit 197a67398a
6 changed files with 27 additions and 20 deletions

View File

@ -4,13 +4,13 @@
"summary": "技能目录站:把对外发布的技能发布成一个自托管目录站(动态服务从 catalog.json 现渲染,附同源静态快照;能干什么 / 先装什么 / 要配什么 / 依赖谁 / 一条安装命令)。",
"tier": 1,
"status": "stable",
"version": "356a0c0",
"version": "5979776",
"source": {
"path": "skills/skill-catalog",
"commit": "356a0c0",
"describe": "356a0c0",
"commit": "5979776",
"describe": "5979776",
"dirty": false,
"packed_at": "2026-10-02T06:26:53.502Z"
"packed_at": "2026-10-02T06:28:52.768Z"
},
"platforms": [
"darwin",
@ -177,7 +177,7 @@
{
"path": "VERSION",
"bytes": 6,
"sha256": "1f930dd1f133c1f9"
"sha256": "71015c979ccb0fc8"
},
{
"path": "assets/app.js",
@ -206,8 +206,8 @@
},
{
"path": "scripts/render.mjs",
"bytes": 17548,
"sha256": "240971a1d11a90ab"
"bytes": 17690,
"sha256": "6bc3942aa699352c"
},
{
"path": "scripts/serve.mjs",
@ -221,8 +221,8 @@
},
{
"path": "scripts/skill-catalog.mjs",
"bytes": 26089,
"sha256": "22a325d47bb32dda"
"bytes": 26192,
"sha256": "19c681002e68a1e4"
}
],
"leak_scan": {

View File

@ -10,7 +10,7 @@
## 安装
```sh
pi install git:gitea.vhkd.top/pi-hub/skill-catalog.git@v0.2.0
pi install git:gitea.vhkd.top/pi-hub/skill-catalog.git@v0.2.1
```
装完 `pi-skill list` 能看到 `skill-catalog`,`pi-skill skill-catalog check` 会告诉还缺什么。

View File

@ -1,6 +1,6 @@
{
"name": "skill-catalog",
"version": "0.2.0",
"version": "0.2.1",
"description": "技能目录站:把对外发布的技能发布成一个自托管目录站(动态服务从 catalog.json 现渲染,附同源静态快照;能干什么 / 先装什么 / 要配什么 / 依赖谁 / 一条安装命令)。",
"license": "GPL-3.0-or-later",
"keywords": [

View File

@ -1 +1 @@
0.2.0
0.2.1

View File

@ -102,7 +102,11 @@ ${siteFoot(depth, generatedAt)}
}
function cardOf(entry) {
const platformLabel = entry.platforms.includes('all') ? '全平台' : entry.platforms.map(platformLabelOf).join('/');
const platformLabel = entry.platforms.includes('all')
? '全平台'
: entry.platforms.length
? entry.platforms.map(platformLabelOf).join('/')
: '未声明平台';
const facts = [
`<span class="platform-badge" title="支持平台">${escapeHtml(platformLabel)}</span>`,
...entry.requires.slice(0, 3).map(item => `<span class="meta-chip">${escapeHtml(item.name)}</span>`),
@ -216,7 +220,7 @@ ${entry.usesPublic.length || entry.usedBy.length ? '' : '<li class="muted">独
<span class="chip layer-${entry.layer}">${LAYER_LABEL[entry.layer]}</span>
<span class="meta-chip">${LAYER_HINT[entry.layer]}</span>
${entry.status !== 'stable' ? `<span class="meta-chip meta-chip-warn">${entry.status === 'experimental' ? '实验性' : '将退役'}</span>` : ''}
${entry.platforms.map(platform => `<span class="meta-chip">${escapeHtml(platform)}</span>`).join('')}
${entry.platforms.map(platform => `<span class="meta-chip">${escapeHtml(platformLabelOf(platform))}</span>`).join('')}
</div>
</header>
<div class="detail-grid">
@ -306,18 +310,20 @@ export function renderIndexPage({ entries, siteUrl = '', fontsCss = null, genera
<span class="count" id="count">${entries.length}</span>
</div>
${
requires.length
requires.length || platforms.length > 1
? `<div class="chipbar" id="requires">
${
platforms.length > 1
? `<span class="chip-label">平台</span>${platforms
.map(value => `<button class="chip filter" data-platform="${escapeHtml(value)}" aria-pressed="false">${escapeHtml(platformLabelOf(value))}</button>`)
.join('')}
<span class="chip-sep"></span>`
.join('')}<span class="chip-sep"></span>`
: ''
}
${
requires.length
? `<span class="chip-label">按依赖筛选</span>${requires.map(name => `<button class="chip filter" data-requires="${escapeHtml(name)}" aria-pressed="false">${escapeHtml(name)}</button>`).join('')}`
: ''
}
<span class="chip-label">按依赖筛选</span>
${requires.map(name => `<button class="chip filter" data-requires="${escapeHtml(name)}" aria-pressed="false">${escapeHtml(name)}</button>`).join('')}
<button class="chip clear" id="clear-filters" type="button" hidden>清除筛选</button>
</div>`
: ''

View File

@ -136,7 +136,8 @@ export function collectCatalog(repo = repoRoot()) {
useWhen: declared.useWhen ?? '',
tier: declared.tier,
version,
platforms: declared.platforms ?? ['all'],
// 平台声明在 SKILL.md frontmatter(skill.platforms),interface.json 里没有这个字段。
platforms: skill.platforms ?? [],
commands: (declared.commands ?? []).map(command => ({
name: command.name,
summary: command.summary ?? '',