Skip to content

feat(plugin-page): the page is a picture, like the upstream plugins' - #150

Merged
viztor merged 1 commit into
mainfrom
feat/plugin-page-image
Nov 2, 2026
Merged

viztor merged 1 commit into
mainfrom
feat/plugin-page-image

Conversation

@viztor

@viztor viztor commented Nov 2, 2026

Copy link
Copy Markdown
Owner

The upstream page this is modelled on (自定义插件索引) renders exactly one line of Markdown on its plugin page:

![添加插件索引 URL 后,在「发现」标签页安装其中的插件](preview.zh.svg)

The title, the version and the one-sentence description are in the page header — from locale meta.title / meta.description — so a detail document that repeats them says it twice.

The page is now a picture

docs/detail.md / docs/detail.zh-CN.md are one image line each, and the image is a UI preview, not a brand banner:

  • left — the settings card: the three groups, the switches;
  • right — the Go meter that sits above the composer: the three windows with their mini rings, the monthly allowance, the refresh.

Two pictures, one per language, generated from one layout so they cannot drift.

设置卡片,以及输入框上方的 Go 计量表

What the tests now hold

test/plugin-detail.test.ts asserts the page is the picture and nothing else — one non-empty line, an image, its file present and shipped. It used to require links onward, which was a rule about long pages rather than about this one.

The language-pair gate gained the axis these pages actually have: the two languages must show the same number of pictures, and each referenced file must exist. Its other axes lost their minimums — a page with no headings and no table is not a pairing failure, and a floor tuned to a 461-line README was measuring the wrong thing.

Verified through the host's own resolver

en     origin=locale doc=docs/detail.md       图=docs/media/preview.svg     6620B image/svg+xml
zh-CN  origin=locale doc=docs/detail.zh-CN.md 图=docs/media/preview.zh.svg  6637B image/svg+xml
zh     origin=locale doc=docs/detail.zh-CN.md 图=docs/media/preview.zh.svg  6637B image/svg+xml
ja     origin=locale doc=docs/detail.md       图=docs/media/preview.svg     6620B image/svg+xml

The brand banner stays — in the READMEs only.

gate result
suite 1236 passed / 83 files
vp check 0 errors
scripts/check.ts passes

The upstream page this was compared against (`自定义插件索引`) renders exactly one
line of Markdown on its plugin page:

    ![添加插件索引 URL 后,在「发现」标签页安装其中的插件](preview.zh.svg)

The title, the version and the one-sentence description sit in the page HEADER —
from `locale` `meta.title` / `meta.description` — so a detail document that
repeats them is saying it twice.

So `docs/detail.md` and `docs/detail.zh-CN.md` are now one image line each, and
the image is a UI preview rather than a brand banner: on the left the settings
card (the three groups, the switches), on the right the Go meter that sits above
the composer (three windows, the monthly allowance, the refresh). Two pictures,
one per language, generated from one layout so they cannot drift.

`test/plugin-detail.test.ts` now asserts the page is **the picture and nothing
else** — one non-empty line, an image, its file present and shipped — instead of
linking onward, which was a rule about long pages rather than about this one.

The language-pair gate gained the axis these pages actually have: the two
languages must SHOW the same number of pictures, and each referenced file must
exist. Its other axes lost their minimums — a page with no headings and no table
is not a pairing failure, and a floor tuned to a 461-line README was measuring
the wrong thing.

The brand banner stays, in the READMEs only.
@viztor
viztor merged commit 29a0d96 into main Nov 2, 2026
3 checks passed
@viztor
viztor deleted the feat/plugin-page-image branch November 2, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant