Files
plugins-marketplace/src/pages/index.astro
T
chrnx e60de81ac0 feat: sell the listing to plugin authors, not just describe it
The home had the facts but no pull. It now shows a whole plugin in the
hero, explains what a plugin is and why it is cheap to write, says what
listing here gets you, and ends on the honest hook: the listing is new,
so the first community plugins get the front row. Every claim is one the
code backs today.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-09-24 10:18:51 -05:00

64 lines
2.2 KiB
Plaintext

---
import { getCollection } from 'astro:content';
import Header from '../components/Header.astro';
import Footer from '../components/Footer.astro';
import PluginCard from '../components/PluginCard.astro';
import Hero from '../components/sections/Hero.astro';
import WhatIsAPlugin from '../components/sections/WhatIsAPlugin.astro';
import WhyHere from '../components/sections/WhyHere.astro';
import HowItWorks from '../components/sections/HowItWorks.astro';
import FrontRow from '../components/sections/FrontRow.astro';
import '../styles/global.css';
// Read at build time by the collection's loader (scripts/loader.mjs) — this site is static files
// on cPanel. Under CI a registry that does not answer fails the build; off CI that entry is left out.
const plugins = (await getCollection('plugins'))
.map(({ id, data }) => ({
slug: id,
name: data.pkg,
description: data.description,
repo: data.repo,
npm: data.npm,
jsr: data.jsr,
version: data.version,
runtimes: data.runtimes,
// An internal plugin could be listed on npm alone and still be ours, so check both fields.
internal: (data.jsr ?? data.npm ?? '').startsWith('@green-tea/'),
}))
.sort((a, b) => a.name.localeCompare(b.name));
---
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="icon" href="/plugins/favicon.svg" type="image/svg+xml" />
<title>Green Tea. plugins</title>
<meta name="description" content="List your green-tea plugin. JSR recommended; npm works too, as long as it is ESM only." />
<link rel="canonical" href="https://green-tea.expressive-tea.io/plugins" />
</head>
<body>
<Header />
<main>
<Hero />
<WhatIsAPlugin />
<section class="section wrap" id="plugins">
<p class="kicker">The listing</p>
<h2>Official plugins, and room for yours</h2>
<p class="section__lead">Three to start. The version and runtimes on each card come straight from the registry.</p>
<div class="grid">
{plugins.map((plugin) => <PluginCard {...plugin} />)}
</div>
</section>
<WhyHere />
<HowItWorks />
<FrontRow />
</main>
<Footer />
</body>
</html>