From b26201ee06b0dc45790c894b2c9ef135a026969d Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Thu, 24 Sep 2026 09:57:03 -0500 Subject: [PATCH] feat: lead the home with an invitation to list a plugin The home opened with a definition of a plugin and left 'Add your plugin' for the end. It now says where to publish and how to be listed, and the definition and review criteria move to CONTRIBUTING. It also stops claiming automatic checks that do not run yet. Signed-off-by: Diego Resendez --- CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++ src/components/Footer.astro | 2 +- src/components/Header.astro | 2 +- src/pages/index.astro | 58 +++++++++++++++---------------------- src/styles/global.css | 7 +++++ 5 files changed, 76 insertions(+), 37 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e3a6322 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Listing a plugin + +## What counts as a green-tea plugin + +A factory that returns `{ name, mount }`. It imports `@green-tea/core` as types only, with core in +`devDependencies`, so installing the plugin never pulls in a second copy of core. It needs +`@green-tea/core@26.9.0-beta.2` or newer. That is the release where plugins took this shape and +`app.boot()` became public. + +## Where to publish it + +JSR is what we recommend. It records which runtimes a package supports, and the listing shows +that on every card. + +npm works too, as long as the package is ESM only: `"type": "module"`, no `require` condition, and +no `.cjs` file in `main` or `exports`. Dual ESM/CJS packages are turned away. green-tea is ESM from +end to end, and a `require` path is the first thing to break when the Node version floor moves. + +## Add the entry + +Add one file, `src/content/plugins/.yaml`: + +```yaml +jsr: "@your-scope/green-tea-your-plugin" # or npm: green-tea-your-plugin +repo: https://github.com/you/green-tea-your-plugin +description: "One sentence, 20 to 200 characters." +``` + +Names follow one pattern per registry: `green-tea-` or `@scope/green-tea-` on npm, +`@scope/` on JSR. There is no version field and no runtimes field. The listing reads both from +the registry, so your entry can't go stale. + +## What gets checked + +The build checks two things on its own: the package exists on the registry you named, and an npm +package is ESM only. A package that fails either one is not listed. + +A person checks the rest. The package has to be a factory returning `{ name, mount }` and keep +core as a type-only dependency. Its README has to cover all four runtimes (Node, Deno, Bun, +workerd) and give a reason next to each one it doesn't support. + +## When it goes live + +Merged entries go out with the next Friday cut. diff --git a/src/components/Footer.astro b/src/components/Footer.astro index ea0ce10..2409cfa 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -8,7 +8,7 @@ const linkColumns = [ { heading: 'This listing', links: [ - { label: 'Add your plugin', href: '#contribute', external: false }, + { label: 'Add your plugin', href: '/plugins/#contribute', external: false }, { label: 'Source', href: 'https://github.com/Expressive-Tea/green-tea-marketplace', diff --git a/src/components/Header.astro b/src/components/Header.astro index c1c99a3..3cd436b 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -6,7 +6,7 @@ import Icon from './Icon.astro'; // what this one is. The logo links out to green-tea rather than to `/`, because a reader who // clicks a brand mark is asking for the project, and the project lives elsewhere. const navLinks = [ - { label: 'Add your plugin', href: '#contribute', external: false }, + { label: 'Add your plugin', href: '/plugins/#contribute', external: false }, { label: 'Docs', href: 'https://green-tea.expressive-tea.io/docs', external: true }, { label: 'green-tea', href: 'https://green-tea.expressive-tea.io', external: true }, { diff --git a/src/pages/index.astro b/src/pages/index.astro index b1d0a93..11bb395 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -21,6 +21,14 @@ const plugins = (await getCollection('plugins')) internal: (data.jsr ?? data.npm ?? '').startsWith('@green-tea/'), })) .sort((a, b) => a.name.localeCompare(b.name)); +// "Add your plugin" opens GitHub's new-file editor inside this repo with an example already +// filled in, so a contributor edits a few lines and opens the pull request from there. +const EXAMPLE = `jsr: "@your-scope/green-tea-your-plugin" # recommended. Or npm: green-tea-your-plugin (ESM only) +repo: https://github.com/you/green-tea-your-plugin +description: "One sentence, 20 to 200 characters." +`; +const ADD_URL = `https://github.com/Expressive-Tea/green-tea-marketplace/new/main/src/content/plugins?filename=green-tea-your-plugin.yaml&value=${encodeURIComponent(EXAMPLE)}`; +const CONTRIBUTING = 'https://github.com/Expressive-Tea/green-tea-marketplace/blob/main/CONTRIBUTING.md'; --- @@ -29,7 +37,7 @@ const plugins = (await getCollection('plugins')) Green Tea. plugins - + @@ -37,51 +45,31 @@ const plugins = (await getCollection('plugins'))
-

Plugins

+

Built a green-tea plugin? List it here.

- A plugin is a named object that adds steps and providers to your graph. It imports - green-tea as types only, so installing one never pulls a second copy of core. + Publish it to JSR (our recommendation) or to npm as ESM only. Then add one small file to + this repo, and it shows up on the next Friday cut.

-

- Everything here needs @green-tea/core@26.9.0-beta.2 or newer. That is the - release where a plugin became { name, mount } and - app.boot() went public; on anything older these will not mount. +

+ Add your plugin + Browse plugins

-
+
{plugins.map((plugin) => )}
-

Add your plugin

-

- Fork the listing, add one file under src/content/plugins/, open a pull - request. There is no version and no runtimes field — both are read from the registry, so - your entry cannot go stale. -

- -
npm: green-tea-foo            # at least one of npm / jsr
-jsr: "@acme/green-tea-foo"
-repo: https://github.com/acme/green-tea-foo
-description: "One sentence, 20–200 characters."
- -

- A check runs against npm and JSR: the package has to exist, depend on - @green-tea/core, and declare at least one runtime. Then a person reads it — - that it really is a factory returning { name, mount }, and that its - README lists all four runtimes with a reason beside each one it does not support. -

-

- Merged entries go live on the next Friday cut. -

-

- - Open the listing on GitHub → - -

+

How it works

+
    +
  1. Publish to JSR, or to npm as an ESM-only package.
  2. +
  3. Open a pull request that adds one yaml file.
  4. +
  5. When it merges, it goes live the next Friday.
  6. +
+

What counts as a plugin, and what a reviewer checks, is in CONTRIBUTING.md.

diff --git a/src/styles/global.css b/src/styles/global.css index 472ed54..f578746 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -419,3 +419,10 @@ main { .plugin__body { grid-template-columns: 1fr; } .versions { order: -1; } } + +.hero__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.5rem; } +.button--ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); } +.button--ghost:hover { border-color: var(--matcha); } +.steps { padding-left: 1.25rem; } +.steps li { padding-block: 0.25rem; } +.contribute a:not(.button) { color: var(--matcha); }