One YAML file per plugin. There is deliberately no version and no runtimes field in an entry: both are read from npm and JSR when the page is built, so a card cannot go stale or claim support a package never declared. The strictness lives in one flag. Under CI a registry that does not answer fails the build, because a listing that silently drops a plugin is worse than no deploy. Locally an unpublished package falls back to scripts/preview.mjs and says so — a site nobody can look at until its packages ship is a site nobody can design. The three seed plugins are unpublished today, so that fallback is what renders them; it goes away with them. Every card shows all four runtimes, never only the supported ones. Colour means the package declares it runs there, dim grey means it does not — and the tooltip is what separates "declared unsupported" from "nobody said", which look identical but are not the same fact. The brand marks carry no <title>: an SVG's own title wins over its parent's, which is why the first attempt showed a help cursor and no tooltip. They are aria-hidden and pointer-events: none, so the label and the hover both belong to the list item, and the tooltip works from the keyboard too. Type and palette are self-hosted from green-tea-site, so the sites read as one project rather than three that share a colour. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2.9 KiB
green-tea-marketplace
The plugin listing for green-tea, served at https://green-tea.expressive-tea.io/plugins.
One YAML file per plugin under src/content/plugins/. Versions and runtimes are not stored
here — they are read from npm and JSR when the site is built, so a card cannot go stale or claim
support a package never declared.
npm: "@green-tea/jwt" # at least one of npm / jsr
jsr: "@green-tea/jwt"
repo: https://github.com/Expressive-Tea/green-tea-plugins
description: "One sentence, 20–200 characters."
Naming is enforced by the content collection's schema, so a wrongly-named entry fails the build:
| npm | JSR | |
|---|---|---|
| Internal | @green-tea/<x> |
@green-tea/<x> |
| Third party | green-tea-<x> or @scope/green-tea-<x> |
@scope/green-tea-<x> |
Commands
npm run dev # http://localhost:4321/plugins
npm run build # static output in dist/
npm test # the deploy script's self-test; no network
npm run deploy # build, then upload — see below
Live data, and why a local build still works
scripts/registry.mjs reads npm and JSR at build time.
- With
CI=true— a registry that does not answer fails the build. A listing that silently drops a plugin, or shows last month's version, is worse than no deploy. - Locally — an unpublished package falls back to
scripts/preview.mjsand logs a line saying so, because a site nobody can look at until its packages ship is a site nobody can design.
scripts/preview.mjs is temporary. Delete it, and its import in src/pages/index.astro, once
@green-tea/jwt, @green-tea/metrics and @green-tea/rate-limit are published.
Deploy
By hand, from a maintainer's machine. The key authenticates as the whole cPanel account, so it is never a CI secret.
DEPLOY_REMOTE=green-tea.expressive-tea.io/plugins \
DEPLOY_HOST=user@host \
npm run deploy
npm run deploy -- --dry-run prints the SFTP batch without sending anything.
Two things that account forces, which no error message will explain:
- Uploads never delete. That docroot holds
.well-known/acme-challenge; a blind delete takes the certificate renewal with it. Old hashed assets simply accumulate. .htaccessnever travels fromdist/. The one on the server carries cPanel's generated PHP handler block, which is not in this repository.
Before the first deploy, create the directory by hand — deploy.mjs starts with cd and fails
if the target does not exist:
sftp -i ~/.ssh/expressive-tea-cpanel user@host
sftp> cd green-tea.expressive-tea.io
sftp> mkdir plugins
sftp> bye
Cadence: Friday, when something merged that week.
Not here yet
CI (validate.mjs and the GitHub Actions workflow that runs the registry checks on every pull
request) lands after the initial deploy.