@grove-dev/cli 0.4.1 → 0.5.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +2 -0
  2. package/dist/import-cli.d.ts +28 -0
  3. package/dist/import-cli.d.ts.map +1 -0
  4. package/dist/import-cli.js +46 -0
  5. package/dist/import-cli.js.map +1 -0
  6. package/dist/index.js +4 -0
  7. package/dist/index.js.map +1 -1
  8. package/dist/package.json +1 -1
  9. package/dist/readme-cli.d.ts +3 -0
  10. package/dist/readme-cli.d.ts.map +1 -0
  11. package/dist/readme-cli.js +120 -0
  12. package/dist/readme-cli.js.map +1 -0
  13. package/dist/site/.github/workflows/readme.yml +41 -0
  14. package/dist/site/README.md +45 -0
  15. package/dist/site/content/records/crewai.md +898 -0
  16. package/dist/site/content/records/dify.md +35 -0
  17. package/dist/site/content/records/flowise.md +38 -0
  18. package/dist/site/content/records/llamaindex.md +45 -0
  19. package/dist/site/content/records/ollama.md +39 -0
  20. package/dist/site/content/records/open-webui.md +35 -0
  21. package/dist/site/data/records/crewai.yml +2 -0
  22. package/dist/site/data/records/dify.yml +2 -0
  23. package/dist/site/data/records/flowise.yml +2 -0
  24. package/dist/site/data/records/llamaindex.yml +2 -0
  25. package/dist/site/data/records/ollama.yml +2 -0
  26. package/dist/site/data/records/open-webui.yml +2 -0
  27. package/dist/site/data/taxonomy/licenses.yml +24 -0
  28. package/dist/site/grove.config.ts +15 -1
  29. package/dist/site/package.json +4 -4
  30. package/dist/site/src/components/TaxonomyList.astro +110 -0
  31. package/dist/site/src/pages/[slug]/[recordSlug].astro +35 -502
  32. package/dist/site/src/pages/categories/[name].astro +42 -0
  33. package/dist/site/src/pages/empty.astro +4 -3
  34. package/dist/site/src/pages/licenses/[name].astro +42 -0
  35. package/dist/site/src/pages/stacks/[name].astro +36 -7
  36. package/dist/site/src/styles/global.css +5 -12
  37. package/package.json +2 -2
  38. package/dist/site/src/layouts/Base.astro +0 -22
@@ -1,76 +1,32 @@
1
1
  ---
2
2
  /**
3
- * Detail page — one record at a time.
4
- *
5
- * Layout (top to bottom):
6
- * 1. Breadcrumb — back to the directory index
7
- * 2. AppCard-style header — logo + name + owner + description + CTAs
8
- * 3. ScoreBars — 5-dimension + overall score block
9
- * 4. BestFor / WhyListed / Caveats — 3-column curation grid
10
- * 5. GitHub signals dl — stars, forks, pushed, license, language
11
- * 6. Stack + Platform chips — Icon (with fallback to text)
12
- * 7. Distribution channels — npm/crates/docker/etc. (when present)
13
- * 8. Content markdown — `record.content` (rendered as raw HTML
14
- * body) when present
15
- * 9. JSON-LD SoftwareSourceCode — for SEO + AI crawlers
16
- *
17
- * Generic across the 3 record kinds (project / resource / entity) —
18
- * non-project fields simply render nothing. The URL is dynamic on
19
- * both `[slug]` (blueprint route, e.g. `projects`/`resources`/
20
- * `entities`) and `[recordSlug]` (the record slug), so a single page
21
- * file serves every blueprint and every record.
3
+ * Detail page — thin consumer wiring up the package's
4
+ * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,
5
+ * and RecordSidebar components. All rendering logic, prose
6
+ * styling, sidebar visibility, and activity-badge rules live in
7
+ * `@grove-dev/astro`; this file only composes them.
22
8
  */
23
- import siteConfig from "@grove/generated/site-config.json";
24
- import {
25
- fullRecords,
26
- getRecordDetailModel,
27
- } from "@grove-dev/astro/server";
28
- import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
29
- import Icon from "@grove-dev/astro/components/Icon.astro";
30
- import ScoreBars from "@grove-dev/astro/components/ScoreBars.astro";
31
- import CurationGrid from "@grove-dev/astro/components/CurationGrid.astro";
32
- import { prettySlug, labelDisplay } from "@grove-dev/astro";
33
- import type { LabelId } from "@grove-dev/astro";
9
+ import siteConfig from '@grove/generated/site-config.json';
10
+ import { getRecordDetailModel, recordDetailPaths } from '@grove-dev/astro/server';
11
+ import BaseLayout from '@grove-dev/astro/layouts/BaseLayout.astro';
12
+ import RecordHeader from '@grove-dev/astro/components/RecordHeader.astro';
13
+ import EditorialSummary from '@grove-dev/astro/components/EditorialSummary.astro';
14
+ import TableOfContents from '@grove-dev/astro/components/TableOfContents.astro';
15
+ import MarkdownBody from '@grove-dev/astro/components/MarkdownBody.astro';
16
+ import RecordSidebar from '@grove-dev/astro/components/RecordSidebar.astro';
34
17
 
35
18
  export function getStaticPaths() {
36
- // Walk every record and emit a path for it. The directory slug
37
- // is read from the static site-config import at the top of this
38
- // file (Vite resolves the JSON at build time). This template
39
- // ships with the `project-directory` blueprint, so the slug is
40
- // always `projects`; swapping in a different blueprint means
41
- // changing the blueprint config that drives this value.
42
- const dirSlug = siteConfig.blueprintConfig?.routeSlug ?? "projects";
43
- return fullRecords.map((record) => ({
44
- params: { slug: dirSlug, recordSlug: record.slug },
45
- }));
19
+ return recordDetailPaths(siteConfig);
46
20
  }
47
21
 
48
- const recordSlug = Astro.params.recordSlug ?? "";
22
+ const dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';
49
23
  const detail = getRecordDetailModel(
50
- recordSlug,
24
+ Astro.params.recordSlug ?? '',
51
25
  siteConfig,
52
- Astro.params.slug ?? siteConfig.blueprintConfig?.routeSlug ?? "projects",
26
+ Astro.params.slug ?? dirSlug,
53
27
  );
54
- if (!detail) return Astro.redirect(`/${siteConfig.blueprintConfig?.routeSlug ?? "projects"}`);
55
- const {
56
- slug, record, isProject, name, title, description,
57
- itemSingular, repoUrl, homepageUrl, stacks, platforms, github, forks,
58
- language, licenseSpdx, pushedAt, starsLabel, pushedLabel, ownerRepo, avatarSrc,
59
- initials, bestFor, whyListed, caveats, distribution, scores, curationLabels,
60
- tags, healthLabel, contentHtml, monthlyCommits, maxMonthlyCommits,
61
- contributionSignals, languages, totalLanguageBytes, jsonLd,
62
- } = detail;
63
-
64
- // Map each known label to a static Tailwind class string so every
65
- // utility is visible to Tailwind's source scanner. Unknown/legacy
66
- // labels use the neutral secondary badge treatment.
67
- const labelClassMap: Record<LabelId, string> = {
68
- new: "!bg-emerald-50 !text-emerald-700 dark:!bg-emerald-950/80 dark:!text-emerald-300",
69
- hot: "!bg-orange-50 !text-orange-800 dark:!bg-orange-950/80 dark:!text-orange-300",
70
- mature: "!bg-blue-50 !text-blue-700 dark:!bg-blue-950/80 dark:!text-blue-300",
71
- featured: "inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground",
72
- };
73
-
28
+ if (!detail) return Astro.redirect(`/${dirSlug}`);
29
+ const { record, name, title, description, itemSingular, jsonLd } = detail;
74
30
  ---
75
31
 
76
32
  <BaseLayout
@@ -82,446 +38,23 @@ const labelClassMap: Record<LabelId, string> = {
82
38
  submitHref="/submit"
83
39
  submitLabel={`Submit ${itemSingular}`}
84
40
  >
85
- <article class="py-12 sm:py-16">
86
- <div class="mx-auto w-full max-w-wide px-5 sm:px-7">
87
- <nav class="mb-6 text-2xs text-ink-500 dark:text-ink-400" aria-label="Breadcrumb">
88
- <a href={`/${slug}`} class="hover:text-ink-900 dark:hover:text-ink-100 capitalize">
89
- {slug}
90
- </a>
91
- <span class="mx-1.5 text-ink-300 dark:text-ink-700">/</span>
92
- <span class="text-ink-700 dark:text-ink-300">{name}</span>
93
- </nav>
94
-
95
- {/* ── AppCard-style header ──────────────────────────────── */}
96
- <header class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors flex flex-col gap-5 p-6 sm:flex-row sm:items-start">
97
- <div class="flex-shrink-0">
98
- {avatarSrc ? (
99
- <img
100
- src={avatarSrc}
101
- alt=""
102
- width="64"
103
- height="64"
104
- loading="lazy"
105
- decoding="async"
106
- class="h-16 w-16 rounded-lg border border-ink-200 object-contain bg-white p-1 dark:border-ink-800 dark:bg-ink-950"
107
- />
108
- ) : (
109
- <span
110
- aria-hidden="true"
111
- class="inline-flex h-16 w-16 items-center justify-center rounded-lg border border-ink-200 bg-ink-50 text-2xl font-semibold text-ink-700 dark:border-ink-800 dark:bg-ink-900 dark:text-ink-200"
112
- >
113
- {initials || "·"}
114
- </span>
115
- )}
116
- </div>
117
-
118
- <div class="min-w-0 flex-1">
119
- <div class="flex flex-wrap items-center gap-2">
120
- <span class="rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium uppercase tracking-wider text-ink-700 dark:border-ink-800 dark:text-ink-300">
121
- {record.kind}
122
- </span>
123
- {record.category && (
124
- <span class="rounded-full border border-ink-200 px-2 py-0.5 text-2xs font-medium text-ink-700 dark:border-ink-800 dark:text-ink-300">
125
- {record.category}
126
- </span>
127
- )}
128
- {curationLabels.map((l) => (
129
- <span class={`inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground ${labelClassMap[l as LabelId] ?? ""}`} title={`Curated: ${labelDisplay(l) ?? l}`}>
130
- {labelDisplay(l) ?? prettySlug(l)}
131
- </span>
132
- ))}
133
- {record.curation?.reviewed && (
134
- <span
135
- class="inline-flex items-center gap-1 rounded border border-emerald-300/60 bg-emerald-50 px-1.5 py-0.5 text-[10px] font-medium text-emerald-800 dark:border-emerald-800/60 dark:bg-emerald-950/40 dark:text-emerald-300"
136
- title="A human curator reviewed this record. (No reviewer name is shown — the framework is reviewer-agnostic; consumers can wire the curation.by field into their own badge component.)"
137
- >
138
- <svg viewBox="0 0 16 16" width="10" height="10" aria-hidden="true" fill="currentColor">
139
- <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0Zm3.41 5.09a.75.75 0 0 0-1.06 0L6.75 8.69 5.65 7.59a.75.75 0 1 0-1.06 1.06l1.65 1.65a.75.75 0 0 0 1.06 0l4.11-4.11a.75.75 0 0 0 0-1.06Z" />
140
- </svg>
141
- Curator reviewed
142
- </span>
143
- )}
144
- {healthLabel && (
145
- <span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-amber-50 !text-amber-800 dark:!bg-amber-950/80 dark:!text-amber-300">{healthLabel}</span>
146
- )}
147
- </div>
148
-
149
- <h1 class="m-0 mt-2 text-[1.75rem] sm:text-[2rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
150
- {name}
151
- </h1>
152
-
153
- {ownerRepo && (
154
- <p class="m-0 mt-1 text-sm text-ink-500 dark:text-ink-400">
155
- <a
156
- href={`https://github.com/${ownerRepo.owner}`}
157
- target="_blank"
158
- rel="noopener noreferrer"
159
- class="text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100"
160
- >
161
- @{ownerRepo.owner}
162
- </a>
163
- <span class="mx-1 text-ink-300 dark:text-ink-700">/</span>
164
- <a
165
- href={repoUrl}
166
- target="_blank"
167
- rel="noopener noreferrer"
168
- class="text-inherit no-underline hover:text-ink-900 dark:hover:text-ink-100"
169
- >
170
- {ownerRepo.repo}
171
- </a>
172
- </p>
173
- )}
174
-
175
- {record.description && (
176
- <p class="m-0 mt-3 max-w-[68ch] text-base leading-relaxed text-ink-700 dark:text-ink-200">
177
- {record.description}
178
- </p>
179
- )}
180
-
181
- <div class="mt-5 flex flex-wrap gap-2">
182
- {repoUrl && (
183
- <a
184
- href={repoUrl}
185
- target="_blank"
186
- rel="noopener noreferrer"
187
- class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 bg-primary text-primary-foreground hover:bg-primary/90"
188
- >
189
- View on GitHub →
190
- </a>
191
- )}
192
- {homepageUrl && (
193
- <a
194
- href={homepageUrl}
195
- target="_blank"
196
- rel="noopener noreferrer"
197
- class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent"
198
- >
199
- Homepage
200
- </a>
201
- )}
202
- </div>
203
- </div>
204
- </header>
205
-
206
- {/* ── Score bars ───────────────────────────────────────── */}
207
- {scores && (
208
- <section class="mt-8 rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-6" aria-labelledby="scores-heading">
209
- <h2 id="scores-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
210
- Scores
211
- </h2>
212
- <p class="m-0 mt-1 text-sm text-ink-500 dark:text-ink-400">
213
- A five-dimension read of how likely this project is to satisfy a curious developer.
214
- </p>
215
- <div class="mt-4">
216
- <ScoreBars scores={scores} />
217
- </div>
218
- </section>
219
- )}
220
-
221
- {/* ── BestFor / WhyListed / Caveats grid ──────────────── */}
222
- {isProject && (
223
- <CurationGrid
224
- bestFor={bestFor}
225
- whyListed={whyListed}
226
- caveats={caveats}
227
- class="mt-8"
228
- />
229
- )}
230
-
231
- {/* ── GitHub signals dl ────────────────────────────────── */}
232
- {isProject && github && (
233
- <section class="mt-8 rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-6" aria-labelledby="signals-heading">
234
- <h2 id="signals-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
235
- GitHub signals
236
- </h2>
237
- <dl
238
- class="mt-4 grid grid-cols-2 gap-x-6 gap-y-3 text-sm sm:grid-cols-3"
239
- aria-label="Repository signals"
240
- >
241
- <div>
242
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
243
- Stars
244
- </dt>
245
- <dd class="m-0 mt-0.5 font-mono text-ink-900 dark:text-ink-100">
246
- {starsLabel ?? "—"}
247
- </dd>
248
- </div>
249
- <div>
250
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
251
- Forks
252
- </dt>
253
- <dd class="m-0 mt-0.5 font-mono text-ink-900 dark:text-ink-100">
254
- {forks}
255
- </dd>
256
- </div>
257
- <div>
258
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
259
- Last push
260
- </dt>
261
- <dd class="m-0 mt-0.5 font-mono text-ink-900 dark:text-ink-100">
262
- {pushedLabel}
263
- </dd>
264
- </div>
265
- {language && (
266
- <div>
267
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
268
- Language
269
- </dt>
270
- <dd class="m-0 mt-0.5 text-ink-900 dark:text-ink-100">{language}</dd>
271
- </div>
272
- )}
273
- {licenseSpdx && (
274
- <div>
275
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
276
- License
277
- </dt>
278
- <dd class="m-0 mt-0.5 text-ink-900 dark:text-ink-100">{licenseSpdx}</dd>
279
- </div>
280
- )}
281
- {pushedAt && (
282
- <div>
283
- <dt class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
284
- Updated
285
- </dt>
286
- <dd class="m-0 mt-0.5 font-mono text-ink-900 dark:text-ink-100">
287
- {pushedAt.slice(0, 10)}
288
- </dd>
289
- </div>
290
- )}
291
- </dl>
292
- </section>
293
- )}
294
-
295
- {/* ── Decision signals (3-col) ──────────────────────────── */}
296
- {isProject && github && (
297
- <section class="mt-8 grid grid-cols-1 gap-4 lg:grid-cols-3" aria-label="Decision signals">
298
- {/* Repository health card */}
299
- <div class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-5">
300
- <h3 class="m-0 text-[1rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
301
- Repository health
302
- </h3>
303
- <dl class="mt-4 grid gap-3 text-sm">
304
- <div class="flex items-center justify-between gap-3">
305
- <dt class="text-ink-500 dark:text-ink-400">Status</dt>
306
- <dd class="font-medium text-ink-900 dark:text-ink-100">
307
- {healthLabel ?? "—"}
308
- </dd>
309
- </div>
310
- <div class="flex items-center justify-between gap-3">
311
- <dt class="text-ink-500 dark:text-ink-400">Stars</dt>
312
- <dd class="font-mono text-ink-900 dark:text-ink-100">
313
- {starsLabel ?? "—"}
314
- </dd>
315
- </div>
316
- <div class="flex items-center justify-between gap-3">
317
- <dt class="text-ink-500 dark:text-ink-400">Forks</dt>
318
- <dd class="font-mono text-ink-900 dark:text-ink-100">
319
- {forks}
320
- </dd>
321
- </div>
322
- <div class="flex items-center justify-between gap-3">
323
- <dt class="text-ink-500 dark:text-ink-400">Open issues</dt>
324
- <dd class="font-mono text-ink-900 dark:text-ink-100">
325
- {github?.open_issues_count ?? "—"}
326
- </dd>
327
- </div>
328
- {licenseSpdx && (
329
- <div class="flex items-center justify-between gap-3">
330
- <dt class="text-ink-500 dark:text-ink-400">License</dt>
331
- <dd class="font-mono text-ink-900 dark:text-ink-100">{licenseSpdx}</dd>
332
- </div>
333
- )}
334
- </dl>
335
- </div>
336
-
337
- {/* Activity bar chart */}
338
- <div class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-5">
339
- <h3 class="m-0 text-[1rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
340
- Activity
341
- </h3>
342
- {monthlyCommits.length > 0 ? (
343
- <figure class="mt-4 m-0">
344
- <div
345
- class="flex h-28 items-end gap-1.5"
346
- role="img"
347
- aria-label="Monthly commits over the last 12 months"
348
- >
349
- {monthlyCommits.map((item) => (
350
- <div class="flex min-w-0 flex-1 flex-col items-center gap-1">
351
- <div
352
- class="w-full rounded-sm bg-ink-700 dark:bg-ink-200"
353
- style={`height: ${Math.max(8, Math.round((item.commits / maxMonthlyCommits) * 96))}px`}
354
- title={`${item.month || "month"}: ${item.commits} commits`}
355
- />
356
- <span class="max-w-full truncate text-[10px] text-ink-500 dark:text-ink-400">
357
- {item.month ? item.month.slice(5) : item.commits}
358
- </span>
359
- </div>
360
- ))}
361
- </div>
362
- <figcaption class="sr-only">
363
- Monthly commit count over the last 12 months
364
- </figcaption>
365
- </figure>
366
- ) : (
367
- <p class="mt-4 m-0 text-sm text-ink-500 dark:text-ink-400">
368
- Monthly commit history is not yet populated for this {itemSingular}.
369
- </p>
370
- )}
371
- </div>
372
-
373
- {/* Contribution readiness chips */}
374
- <div class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-5">
375
- <h3 class="m-0 text-[1rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
376
- Contribution readiness
377
- </h3>
378
- {contributionSignals.length > 0 ? (
379
- <ul class="mt-4 m-0 grid list-none gap-2 p-0 text-sm">
380
- {contributionSignals.map((signal) => (
381
- <li class="flex items-center justify-between gap-3">
382
- <span class="text-ink-700 dark:text-ink-200">{signal.label}</span>
383
- <span class={signal.ok ? "text-emerald-700 dark:text-emerald-400" : "text-ink-400 dark:text-ink-600"}>
384
- {signal.ok ? "Found" : "Missing"}
385
- </span>
386
- </li>
387
- ))}
388
- </ul>
389
- ) : (
390
- <p class="mt-4 m-0 text-sm text-ink-500 dark:text-ink-400">
391
- Contribution files have not been synced yet.
392
- </p>
393
- )}
394
- </div>
395
- </section>
396
- )}
397
-
398
- {/* ── Language mix ─────────────────────────────────────── */}
399
- {isProject && languages.length > 0 && (
400
- <section class="mt-4 rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors p-5">
401
- <h3 class="m-0 text-[1rem] font-semibold tracking-tight text-ink-900 dark:text-ink-100">
402
- Language mix
403
- </h3>
404
- <dl class="mt-4 grid gap-2 text-sm">
405
- {languages.map(([language, bytes]) => {
406
- const pct = Math.round((bytes / totalLanguageBytes) * 100);
407
- return (
408
- <div class="grid grid-cols-[8rem_minmax(0,1fr)_3rem] items-center gap-3">
409
- <dt class="truncate text-ink-700 dark:text-ink-200">{language}</dt>
410
- <dd class="h-2 overflow-hidden rounded-sm bg-ink-200 dark:bg-ink-800">
411
- <div class="h-full bg-ink-700 dark:bg-ink-200" style={`width: ${pct}%`} />
412
- </dd>
413
- <dd class="text-right font-mono text-2xs text-ink-500 dark:text-ink-400">{pct}%</dd>
414
- </div>
415
- );
416
- })}
417
- </dl>
418
- </section>
419
- )}
420
-
421
- {/* ── Stack + Platform chips ───────────────────────────── */}
422
- {isProject && (stacks.length > 0 || platforms.length > 0) && (
423
- <section class="mt-8" aria-labelledby="stacks-heading">
424
- <h2 id="stacks-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
425
- Stack & platforms
426
- </h2>
427
- <div class="mt-4 flex flex-col gap-3">
428
- {stacks.length > 0 && (
429
- <div class="flex flex-wrap items-center gap-2">
430
- <span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
431
- Stack
432
- </span>
433
- {stacks.map((s) => (
434
- <span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground items-center gap-1.5">
435
- <Icon name={s} category="stack" size={14} />
436
- {s}
437
- </span>
438
- ))}
439
- </div>
440
- )}
441
- {platforms.length > 0 && (
442
- <div class="flex flex-wrap items-center gap-2">
443
- <span class="text-2xs font-medium uppercase tracking-wider text-ink-500 dark:text-ink-400">
444
- Platform
445
- </span>
446
- {platforms.map((p) => (
447
- <span class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground items-center gap-1.5">
448
- <Icon name={p} category="platform" size={14} />
449
- {p}
450
- </span>
451
- ))}
452
- </div>
453
- )}
454
- </div>
455
- </section>
456
- )}
457
-
458
- {/* ── Tags ─────────────────────────────────────────────── */}
459
- {tags.length > 0 && (
460
- <section class="mt-8" aria-labelledby="tags-heading">
461
- <h2 id="tags-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
462
- Tags
463
- </h2>
464
- <ul class="mt-4 m-0 flex list-none flex-wrap gap-1.5 p-0">
465
- {tags.map((t) => (
466
- <li>
467
- <a
468
- href={`/${slug}?q=${encodeURIComponent(t)}`}
469
- class="inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground items-center gap-1.5"
470
- >
471
- {t}
472
- </a>
473
- </li>
474
- ))}
475
- </ul>
476
- </section>
477
- )}
478
-
479
- {/* ── Distribution channels ────────────────────────────── */}
480
- {distribution.length > 0 && (
481
- <section class="mt-8" aria-labelledby="dist-heading">
482
- <h2 id="dist-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
483
- Distribution channels
484
- </h2>
485
- <ul class="mt-4 m-0 flex list-none flex-col gap-2 p-0">
486
- {distribution.map((c) => (
487
- <li class="rounded-[calc(var(--radius)+0.25rem)] border-0 bg-muted shadow-none transition-colors flex flex-wrap items-baseline justify-between gap-2 p-3">
488
- <div class="flex flex-col">
489
- <span class="text-sm font-semibold text-ink-900 dark:text-ink-100">
490
- {c.label ?? c.type}
491
- {c.verified && (
492
- <span class="ml-2 inline-flex min-h-5 items-center justify-center gap-1 rounded-full border border-transparent bg-secondary px-2 py-0.5 align-middle text-xs font-medium leading-none text-secondary-foreground !bg-emerald-50 !text-emerald-700 dark:!bg-emerald-950/80 dark:!text-emerald-300">Verified</span>
493
- )}
494
- </span>
495
- {c.notes && (
496
- <span class="text-xs text-ink-500 dark:text-ink-400">{c.notes}</span>
497
- )}
498
- </div>
499
- <a
500
- href={c.url}
501
- target="_blank"
502
- rel="noopener noreferrer"
503
- class="inline-flex h-8 cursor-pointer items-center justify-center gap-1.5 rounded-[var(--radius)] border border-transparent px-3 text-sm font-medium leading-none no-underline outline-none transition-colors focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/35 border-border bg-secondary text-foreground hover:bg-accent"
504
- >
505
- {c.platform ?? c.type} →
506
- </a>
507
- </li>
508
- ))}
509
- </ul>
510
- </section>
511
- )}
512
-
513
- {/* ── Content markdown ─────────────────────────────────── */}
514
- {contentHtml && (
515
- <section class="mt-8" aria-labelledby="content-heading">
516
- <h2 id="content-heading" class="m-0 text-lg font-semibold tracking-tight text-ink-900 dark:text-ink-100">
517
- Notes
518
- </h2>
519
- <div
520
- class="grove-prose mt-4"
521
- set:html={contentHtml}
41
+ <article class="py-10 sm:py-14">
42
+ <div class="mx-auto w-full max-w-[1240px] px-5 sm:px-7">
43
+ <RecordHeader detail={detail} />
44
+
45
+ <div
46
+ class="grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_320px] lg:gap-12 xl:grid-cols-[minmax(0,1fr)_340px]"
47
+ >
48
+ <div class="min-w-0">
49
+ <EditorialSummary bestFor={detail.bestFor} caveats={detail.caveats} />
50
+ <TableOfContents items={detail.toc} />
51
+ <MarkdownBody
52
+ recordSlug={record.slug}
53
+ fallback={record.content ? "This record doesn't have notes yet." : undefined}
522
54
  />
523
- </section>
524
- )}
55
+ </div>
56
+ <RecordSidebar detail={detail} />
57
+ </div>
525
58
  </div>
526
59
  </article>
527
60
  </BaseLayout>
@@ -0,0 +1,42 @@
1
+ ---
2
+ import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
3
+ import { filterRecords } from "@grove-dev/core";
4
+ import indexPayload from "@grove/generated/records.index.json";
5
+ import siteConfig from "@grove/generated/site-config.json";
6
+ import TaxonomyList from "../../components/TaxonomyList.astro";
7
+
8
+ export function getStaticPaths() {
9
+ const categories = siteConfig.taxonomy?.categories ?? [];
10
+ return categories.map(({ id, name }) => ({
11
+ params: { name: id },
12
+ props: { displayName: name },
13
+ }));
14
+ }
15
+
16
+ const { displayName } = Astro.props;
17
+ const name = Astro.params.name;
18
+ const indexRecords = (indexPayload as { records: unknown[] }).records as never;
19
+ const categoryRecords = filterRecords(indexRecords, {
20
+ categories: [name],
21
+ }) as Array<{
22
+ slug: string;
23
+ name?: string;
24
+ title?: string;
25
+ description?: string;
26
+ repoUrl?: string;
27
+ }>;
28
+ ---
29
+
30
+ <BaseLayout
31
+ title={`${displayName} projects`}
32
+ description={`Open-source projects in the ${displayName} category.`}
33
+ site={siteConfig}
34
+ >
35
+ <TaxonomyList
36
+ name={name}
37
+ eyebrow="Category"
38
+ displayName={displayName}
39
+ lede={`Browse open-source projects in this directory in the ${displayName} category.`}
40
+ records={categoryRecords}
41
+ />
42
+ </BaseLayout>
@@ -1,7 +1,8 @@
1
1
  ---
2
- import Base from "../layouts/Base.astro";
2
+ import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
3
+ import siteConfig from "@grove/generated/site-config.json";
3
4
  ---
4
- <Base title="No results" description="Empty state fixture.">
5
+ <BaseLayout title="No results" description="Empty state fixture." site={siteConfig}>
5
6
  <h1>No results</h1>
6
7
  <p>There are no items to show right now.</p>
7
- </Base>
8
+ </BaseLayout>
@@ -0,0 +1,42 @@
1
+ ---
2
+ import BaseLayout from "@grove-dev/astro/layouts/BaseLayout.astro";
3
+ import { filterRecords } from "@grove-dev/core";
4
+ import indexPayload from "@grove/generated/records.index.json";
5
+ import siteConfig from "@grove/generated/site-config.json";
6
+ import TaxonomyList from "../../components/TaxonomyList.astro";
7
+
8
+ export function getStaticPaths() {
9
+ const licenses = siteConfig.taxonomy?.licenses ?? [];
10
+ return licenses.map(({ id, name }) => ({
11
+ params: { name: id },
12
+ props: { displayName: name },
13
+ }));
14
+ }
15
+
16
+ const { displayName } = Astro.props;
17
+ const name = Astro.params.name;
18
+ const indexRecords = (indexPayload as { records: unknown[] }).records as never;
19
+ const licenseRecords = filterRecords(indexRecords, {
20
+ licenses: [name],
21
+ }) as Array<{
22
+ slug: string;
23
+ name?: string;
24
+ title?: string;
25
+ description?: string;
26
+ repoUrl?: string;
27
+ }>;
28
+ ---
29
+
30
+ <BaseLayout
31
+ title={`${displayName} projects`}
32
+ description={`Open-source projects licensed under ${displayName}.`}
33
+ site={siteConfig}
34
+ >
35
+ <TaxonomyList
36
+ name={name}
37
+ eyebrow="License"
38
+ displayName={displayName}
39
+ lede={`Browse open-source projects in this directory licensed under ${displayName}.`}
40
+ records={licenseRecords}
41
+ />
42
+ </BaseLayout>