@grove-dev/cli 0.17.0 → 0.18.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.
@@ -0,0 +1,15 @@
1
+ import { type CandidateListing, type CandidateRow } from '@grove-dev/core';
2
+ import { Command } from 'commander';
3
+ /** One short line of facts: `fdroid · android · app.id` or `png · 512×512 · 12 KB`. */
4
+ export declare function describeCandidate(row: CandidateRow): string;
5
+ /** The `candidates:` entry a reviewer pastes into `paths.decisions` to approve a row. */
6
+ export declare function reviewStub(row: CandidateRow, reviewer?: string): Record<string, unknown>;
7
+ export declare function formatCandidatesText(listing: CandidateListing, all?: boolean): string;
8
+ /**
9
+ * Markdown for a review issue: one table per record, then the
10
+ * `candidates:` entries to paste into the decisions file for the rows
11
+ * a maintainer approves (change `verdict` to `rejected` to reject).
12
+ */
13
+ export declare function formatCandidatesMarkdown(listing: CandidateListing, all?: boolean): string;
14
+ export declare function buildCandidatesCommand(): Command;
15
+ //# sourceMappingURL=candidates-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidates-cli.d.ts","sourceRoot":"","sources":["../src/candidates-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAKlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,uFAAuF;AACvF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,YAAY,GAAG,MAAM,CAqB3D;AAOD,yFAAyF;AACzF,wBAAgB,UAAU,CAAC,GAAG,EAAE,YAAY,EAAE,QAAQ,SAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWjG;AAkBD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,UAAQ,GAAG,MAAM,CAcnF;AAMD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,UAAQ,GAAG,MAAM,CAyCvF;AAED,wBAAgB,sBAAsB,IAAI,OAAO,CA2BhD"}
@@ -0,0 +1,146 @@
1
+ import { listRecordCandidates, loadConfig, } from '@grove-dev/core';
2
+ import { Command } from 'commander';
3
+ import { stringify as stringifyYaml } from 'yaml';
4
+ function isChannel(row) {
5
+ return row.kind === 'channel';
6
+ }
7
+ function kilobytes(bytes) {
8
+ return bytes < 1024 ? `${bytes} B` : `${Math.round(bytes / 1024)} KB`;
9
+ }
10
+ /** One short line of facts: `fdroid · android · app.id` or `png · 512×512 · 12 KB`. */
11
+ export function describeCandidate(row) {
12
+ if (isChannel(row)) {
13
+ const c = row.candidate;
14
+ const facts = c.facts;
15
+ const parts = [c.label, c.platform];
16
+ if (typeof facts.appId === 'string')
17
+ parts.push(facts.appId);
18
+ if (typeof facts.package === 'string')
19
+ parts.push(`package ${facts.package}`);
20
+ if (typeof facts.tag === 'string')
21
+ parts.push(`release ${facts.tag}`);
22
+ if (Array.isArray(facts.assets))
23
+ parts.push(facts.assets.join(', '));
24
+ if (facts.match === 'project-name') {
25
+ parts.push(facts.versionMatchesRelease ? 'name match, version matches' : 'name match only');
26
+ }
27
+ return parts.filter(Boolean).join(' · ');
28
+ }
29
+ const m = row.candidate;
30
+ const parts = [];
31
+ if (m.format)
32
+ parts.push(m.format);
33
+ if (m.width && m.height)
34
+ parts.push(`${m.width}×${m.height}`);
35
+ if (m.bytes !== undefined)
36
+ parts.push(kilobytes(m.bytes));
37
+ if (m.locale)
38
+ parts.push(m.locale);
39
+ return parts.join(' · ');
40
+ }
41
+ function displayName(row) {
42
+ const c = row.candidate;
43
+ return c.path ?? row.candidate.url;
44
+ }
45
+ /** The `candidates:` entry a reviewer pastes into `paths.decisions` to approve a row. */
46
+ export function reviewStub(row, reviewer = '<your handle>') {
47
+ return {
48
+ id: row.slug,
49
+ kind: row.kind,
50
+ url: row.candidate.url,
51
+ verdict: 'approved',
52
+ reason: '<why this is the app’s own, current asset or channel>',
53
+ reviewedBy: reviewer,
54
+ reviewedAt: '<YYYY-MM-DD>',
55
+ provenance: row.candidate.provenance,
56
+ };
57
+ }
58
+ function groupBySlug(rows) {
59
+ const groups = new Map();
60
+ for (const row of rows) {
61
+ const list = groups.get(row.slug) ?? [];
62
+ list.push(row);
63
+ groups.set(row.slug, list);
64
+ }
65
+ return groups;
66
+ }
67
+ function summaryLine(listing, all) {
68
+ const records = groupBySlug(listing.rows).size;
69
+ const noun = all ? 'candidate(s)' : 'pending candidate(s)';
70
+ return `${listing.rows.length} ${noun} across ${records} record(s); ${listing.recordsWithCandidates} record(s) have candidates in the sync cache.`;
71
+ }
72
+ export function formatCandidatesText(listing, all = false) {
73
+ const lines = [];
74
+ for (const [slug, rows] of groupBySlug(listing.rows)) {
75
+ lines.push(`${slug}`);
76
+ for (const row of rows) {
77
+ const status = all ? ` (${row.status})` : '';
78
+ lines.push(` ${row.kind.padEnd(10)} ${describeCandidate(row)}${status}`, ` ${''.padEnd(10)} ${row.candidate.url} [${row.candidate.provenance.source}]`);
79
+ }
80
+ }
81
+ lines.push(summaryLine(listing, all));
82
+ return lines.join('\n');
83
+ }
84
+ function cell(text) {
85
+ return text.replace(/\|/g, '\\|').replace(/\n/g, ' ');
86
+ }
87
+ /**
88
+ * Markdown for a review issue: one table per record, then the
89
+ * `candidates:` entries to paste into the decisions file for the rows
90
+ * a maintainer approves (change `verdict` to `rejected` to reject).
91
+ */
92
+ export function formatCandidatesMarkdown(listing, all = false) {
93
+ const out = [];
94
+ out.push(`### Channel and media candidates`, '', summaryLine(listing, all), '');
95
+ out.push('Nothing here is published. Approve a row by adding its entry under `candidates:` in the decisions file, then copy the file or channel into the record by hand. Do not hotlink.', '');
96
+ for (const [slug, rows] of groupBySlug(listing.rows)) {
97
+ out.push(`#### ${slug}`, '');
98
+ out.push(all
99
+ ? '| kind | candidate | facts | source | status |'
100
+ : '| kind | candidate | facts | source |');
101
+ out.push(all ? '|---|---|---|---|---|' : '|---|---|---|---|');
102
+ for (const row of rows) {
103
+ const link = `[${cell(displayName(row))}](${row.candidate.url})`;
104
+ const source = `[${row.candidate.provenance.source}](${row.candidate.provenance.url})`;
105
+ const cols = [row.kind, link, cell(describeCandidate(row)), source];
106
+ if (all)
107
+ cols.push(row.status);
108
+ out.push(`| ${cols.join(' | ')} |`);
109
+ }
110
+ const pending = rows.filter((row) => row.status === 'pending');
111
+ if (pending.length > 0) {
112
+ out.push('', '<details><summary>Decision entries</summary>', '', '```yaml', stringifyYaml({ candidates: pending.map((row) => reviewStub(row)) }, { lineWidth: 0 }).trimEnd(), '```', '', '</details>');
113
+ }
114
+ out.push('');
115
+ }
116
+ return out.join('\n').trimEnd();
117
+ }
118
+ export function buildCandidatesCommand() {
119
+ return new Command('candidates')
120
+ .description('List channel and media candidates from the GitHub sync cache that nobody has approved or rejected yet.')
121
+ .option('--slug <slug>', 'only this record')
122
+ .option('--all', 'include approved, rejected and already-in-record candidates')
123
+ .option('--json', 'machine-readable JSON output')
124
+ .option('--markdown', 'Markdown tables for a review issue')
125
+ .action(async (opts) => {
126
+ const config = await loadConfig();
127
+ const listing = await listRecordCandidates(config, process.cwd(), {
128
+ ...(opts.slug ? { slug: opts.slug } : {}),
129
+ ...(opts.all ? { all: true } : {}),
130
+ });
131
+ if (listing.decisionsError) {
132
+ console.error(`[candidates] ${config.paths.decisions}: ${listing.decisionsError}`);
133
+ process.exitCode = 1;
134
+ }
135
+ if (opts.json) {
136
+ console.log(JSON.stringify(listing, null, 2));
137
+ }
138
+ else if (opts.markdown) {
139
+ console.log(formatCandidatesMarkdown(listing, opts.all === true));
140
+ }
141
+ else {
142
+ console.log(formatCandidatesText(listing, opts.all === true));
143
+ }
144
+ });
145
+ }
146
+ //# sourceMappingURL=candidates-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"candidates-cli.js","sourceRoot":"","sources":["../src/candidates-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,oBAAoB,EACpB,UAAU,GAEX,MAAM,i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C,QAAQ,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC;QACpE,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,OAAO,EAAE,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC;QAChE,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import { basename, relative, resolve } from 'node:path';
4
4
  import { cleanupStale, loadConfig, normalizeGithubIntegration, prepareDirectory, syncContributors, validateProject, } from '@grove-dev/core';
5
5
  import { Command } from 'commander';
6
6
  import { buildAuditCommand } from './audit-cli.js';
7
+ import { buildCandidatesCommand } from './candidates-cli.js';
7
8
  import { buildCollectionCommand } from './collection-cli.js';
8
9
  import { buildHealthCommand } from './health-cli.js';
9
10
  import { buildIconsCommand } from './icons-cli.js';
@@ -13,7 +14,7 @@ import { buildMigrateCommand } from './migrate-cli.js';
13
14
  import { detectPackageManager, installCommand, localBin, runScriptCommand, } from './package-manager.js';
14
15
  import { buildReadmeCommand } from './readme-cli.js';
15
16
  import { run } from './run.js';
16
- import { runGithubSync } from './sync-github.js';
17
+ import { formatCandidateRunSummary, runGithubSync } from './sync-github.js';
17
18
  import { appendSyncStepSummary, formatSyncSummaryText, syncExitCode } from './sync-summary.js';
18
19
  import { formatPlan, runUpdate } from './update.js';
19
20
  const program = new Command();
@@ -102,11 +103,13 @@ program
102
103
  console.log('[sync github] disabled by integrations.github.metadata — skipping');
103
104
  return;
104
105
  }
105
- const { outcomes, inlineRecords, cacheDir } = await runGithubSync({
106
+ const run = await runGithubSync({
106
107
  cwd: process.cwd(),
107
108
  config,
108
109
  ...(options.limit === undefined ? {} : { limit: options.limit }),
110
+ userAgent: `grove/${readCliVersion()} (+https://github.com/tortuvshin/grove)`,
109
111
  });
112
+ const { outcomes, inlineRecords, cacheDir } = run;
110
113
  console.log(`[sync github] cache → ${relative(process.cwd(), cacheDir) || '.'}`);
111
114
  if (inlineRecords.length > 0) {
112
115
  // The cache wins over these, and `grove check` warns where they
@@ -114,6 +117,8 @@ program
114
117
  console.log(`[sync github] ${inlineRecords.length} record(s) still carry inline github/health — run \`grove migrate github-cache\` to move them into the cache.`);
115
118
  }
116
119
  console.log(formatSyncSummaryText(outcomes));
120
+ if (run.candidates)
121
+ console.log(formatCandidateRunSummary(run.candidates));
117
122
  await appendSyncStepSummary(outcomes);
118
123
  if (syncExitCode(outcomes, options.strict ?? false) !== 0)
119
124
  process.exitCode = 1;
@@ -175,6 +180,7 @@ program
175
180
  process.exitCode = summary.exitCode;
176
181
  });
177
182
  program.addCommand(buildAuditCommand());
183
+ program.addCommand(buildCandidatesCommand());
178
184
  program.addCommand(buildCollectionCommand());
179
185
  program.addCommand(buildHealthCommand());
180
186
  program.addCommand(buildIconsCommand());
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,UAAU,EACV,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,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,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC9D,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACnC,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;AAClE,CAAC,CACF,CAAC;AAEJ,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAC7C,OAAO,CAAC,UAAU,CAAC,sBAAsB,EAAE,CAAC,CAAC;AAC7C,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACxC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;AAC1C,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAEzC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtE,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grove-dev/cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
6
6
  "license": "MIT",
package/dist/r/about.json CHANGED
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "meta": {
19
19
  "version": "1.3.0",
20
- "requiresGrove": "0.17.0"
20
+ "requiresGrove": "0.18.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -96,7 +96,7 @@
96
96
  ],
97
97
  "meta": {
98
98
  "version": "1.3.0",
99
- "requiresGrove": "0.17.0"
99
+ "requiresGrove": "0.18.0"
100
100
  },
101
101
  "type": "registry:block"
102
102
  }
@@ -17,7 +17,7 @@
17
17
  },
18
18
  {
19
19
  "path": "default/pages/collections/[slug].astro",
20
- "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
20
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
21
21
  "type": "registry:page",
22
22
  "target": "~/src/pages/collections/[slug].astro"
23
23
  },
@@ -54,7 +54,7 @@
54
54
  ],
55
55
  "meta": {
56
56
  "version": "1.3.0",
57
- "requiresGrove": "0.17.0"
57
+ "requiresGrove": "0.18.0"
58
58
  },
59
59
  "type": "registry:block"
60
60
  }
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "meta": {
19
19
  "version": "1.3.0",
20
- "requiresGrove": "0.17.0"
20
+ "requiresGrove": "0.18.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -54,7 +54,7 @@
54
54
  },
55
55
  {
56
56
  "path": "default/layouts/base-layout.astro",
57
- "content": "---\n/**\n * BaseLayout — wraps every page. Owns the theme-detection inline\n * script and the global shell (Header, Footer). Per-page SEO\n * (title, description, OG, JSON-LD) is delegated to `<Seo />` so\n * each page can declare what it needs without polluting the layout\n * file.\n *\n * Generic: takes a `site` prop with brand + nav + stats. No\n * `siteConfig` import — consumers compose the props from their\n * own config (typically `data/generated/site-config.json` for the\n * showcase).\n *\n * GA4 can be configured once through `site.analytics.googleAnalyticsId`\n * or overridden per page with `gaId`. Omit both for privacy-first deployments.\n */\nimport '../styles/system.css';\nimport { derivePrimaryPalette } from '@grove-dev/astro/server';\nimport Footer from './footer.astro';\nimport Header from './header.astro';\nimport Seo from './seo.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface SiteStats {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n repositoryStars?: number;\n repositoryForks?: number;\n repositoryContributors?: number;\n originalRepo?: string;\n originalStars?: number;\n originalForks?: number;\n originalContributors?: number;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n nav: NavItem[];\n footer?: {\n columns?: Array<{\n heading: string;\n items: Array<{ label: string; href: string; external?: boolean }>;\n }>;\n copyright?: string;\n license?: string;\n };\n submission?: {\n eyebrow?: string;\n title?: string;\n description?: string;\n good?: string[];\n avoid?: string[];\n };\n repoUrl?: string;\n url?: string;\n /** Header logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n /** Favicon path under `public/` (e.g. `/favicon.svg`). */\n favicon?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives `<html lang>` and og:locale. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n analytics?: {\n googleAnalyticsId?: string;\n };\n /** Optional directory-level stats — populated from site-config.json\n * at generate time. Components use it to render hero counts,\n * origin card stats, and footer summary lines. */\n stats?: SiteStats;\n /** Theme knobs from grove.config.ts — resolved into CSS custom\n * properties on `<html>` so the package stylesheet picks them up.\n * Values are plain strings because the prop usually arrives from a\n * JSON import; unknown values fall back to the package defaults. */\n theme?: {\n primaryColor?: string;\n /** \"none\" | \"soft\" | \"round\" */\n radius?: string;\n /** \"compact\" | \"comfortable\" | \"spacious\" */\n density?: string;\n containerWidth?: string;\n };\n blueprintConfig?: {\n routeSlug?: string;\n labelSingular?: string;\n labelPlural?: string;\n };\n}\n\ninterface Props {\n title: string;\n description: string;\n site: Site;\n type?: 'website' | 'article' | 'profile';\n noindex?: boolean;\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n /** Open Graph / Twitter image path (e.g. \"/og/records/foo.png\").\n * Defaults to the site-wide /og-image.svg inside <Seo />. */\n image?: string;\n /** Alt text for the OG/Twitter image. */\n imageAlt?: string;\n /** Optional Google Analytics 4 Measurement ID (e.g. \"G-XXXXXX\"). */\n gaId?: string;\n /** Path used for JSON-LD `SearchAction` target. Defaults to \"/items\". */\n searchPath?: string;\n /** Submit button label rendered in the header. Omit to hide. */\n submitLabel?: string;\n /** Submit button href rendered in the header. */\n submitHref?: string;\n}\n\nconst {\n title,\n description,\n site,\n type,\n noindex,\n jsonLd,\n image,\n imageAlt,\n gaId,\n searchPath,\n submitLabel,\n submitHref,\n} = Astro.props;\nconst directoryPath = searchPath ?? `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst effectiveGaId = gaId ?? site.analytics?.googleAnalyticsId;\n\n// ── Theme wiring ─────────────────────────────────────────────────\n// `theme.*` from grove.config.ts resolves to CSS custom properties\n// on the <html> style attribute. An attribute (not an inline\n// <style>) so the override wins over the bundled stylesheet\n// regardless of how Vite orders the CSS output.\nconst RADIUS_PRESETS: Record<string, [string, string, string]> = {\n none: ['0rem', '0rem', '0rem'],\n soft: ['0.625rem', '0.5rem', '0.75rem'],\n round: ['0.875rem', '0.75rem', '1rem'],\n};\nconst DENSITY_SPACING: Record<string, string> = {\n compact: '0.225rem',\n comfortable: '0.25rem',\n spacious: '0.28rem',\n};\n\n// Brand fill and text derive from ONE WCAG computation (contrast.ts)\n// so background and foreground can never drift apart across themes.\n\nconst themeConfig = site.theme;\nconst themeStyleParts: string[] = [];\nif (themeConfig) {\n const radius = RADIUS_PRESETS[themeConfig.radius ?? 'soft'];\n if (radius && themeConfig.radius && themeConfig.radius !== 'soft') {\n themeStyleParts.push(\n `--grove-radius: ${radius[0]}`,\n `--grove-radius-lg: ${radius[1]}`,\n `--grove-radius-xl: ${radius[2]}`,\n );\n }\n const spacing = DENSITY_SPACING[themeConfig.density ?? 'comfortable'];\n if (spacing && themeConfig.density && themeConfig.density !== 'comfortable') {\n themeStyleParts.push(`--spacing: ${spacing}`);\n }\n if (themeConfig.containerWidth) {\n themeStyleParts.push(`--grove-container: ${themeConfig.containerWidth}`);\n }\n const primary = themeConfig.primaryColor;\n if (typeof primary === 'string' && /^#[0-9a-fA-F]{3,8}$/.test(primary)) {\n const palette = derivePrimaryPalette(primary);\n if (palette) {\n themeStyleParts.push(\n `--grove-theme-primary: ${palette.solid}`,\n `--grove-theme-primary-foreground: ${palette.solidForeground}`,\n `--grove-theme-primary-dark: ${palette.dark}`,\n `--grove-theme-primary-dark-foreground: ${palette.darkForeground}`,\n );\n }\n }\n}\nconst themeStyle = themeStyleParts.length > 0 ? `${themeStyleParts.join('; ')};` : undefined;\n\n// `site.favicon` points at a file the consumer owns under `public/`.\n// The fallback is a generated square — tinted with the configured\n// brand color rather than a hardcoded near-black, so an unconfigured\n// site still gets a tab mark that is recognisably its own.\nconst faviconFill = (site.theme?.primaryColor ?? '#18181b').trim();\nconst favicon =\n site.favicon ??\n `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='${encodeURIComponent(faviconFill)}'/%3E%3C/svg%3E`;\n---\n\n<!doctype html>\n<html lang={site.locale ?? 'en'} style={themeStyle}>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta name=\"theme-color\" content=\"#0a0a0c\" media=\"(prefers-color-scheme: dark)\" />\n <meta name=\"theme-color\" content=\"#fafafa\" media=\"(prefers-color-scheme: light)\" />\n <link rel=\"icon\" href={favicon} />\n <link rel=\"sitemap\" href=\"/sitemap.xml\" />\n {/* Preconnect to GitHub's avatar CDN — most pages render at least\n one avatar (record list cards, detail page logo) and the\n connection is reusable across cards. Cross-origin only, no\n document fetch, so the cost is one TLS handshake per page. */}\n <link rel=\"preconnect\" href=\"https://avatars.githubusercontent.com\" crossorigin=\"anonymous\" />\n <link\n rel=\"alternate\"\n type=\"text/plain\"\n href=\"/llms.txt\"\n title=\"LLM usage guidance\"\n />\n\n {effectiveGaId && (\n <>\n <script\n is:inline\n async\n src={`https://www.googletagmanager.com/gtag/js?id=${effectiveGaId}`}\n />\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n window.dataLayer = window.dataLayer || [];\n // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = function gtag() {\n dataLayer.push(arguments);\n };\n gtag(\"js\", new Date());\n gtag(\"config\", gaId, {\n page_path: window.location.pathname + window.location.search,\n page_title: document.title,\n });\n </script>\n </>\n )}\n\n <Seo\n title={title}\n description={description}\n type={type}\n noindex={noindex}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\n searchPath={directoryPath}\n />\n\n <slot name=\"head\" />\n\n <script is:inline>\n // THEME_INIT — runs before paint so the user never sees a\n // flash of the wrong theme. State is persisted in localStorage\n // under the key \"grove-theme\" (matching ThemeToggle.astro).\n (function () {\n var STORAGE_KEY = \"grove-theme\";\n function getMode() {\n try {\n var stored = localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\")\n return stored;\n } catch (e) {\n // localStorage may be blocked (private mode, etc.) —\n // fall through to the system default.\n }\n return \"system\";\n }\n function apply(mode) {\n var resolved =\n mode === \"system\"\n ? (window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\")\n : mode;\n var root = document.documentElement;\n if (resolved === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n root.dataset.theme = mode;\n root.dataset.resolvedTheme = resolved;\n }\n apply(getMode());\n window.addEventListener(\"theme:set\", function (e) {\n apply(e.detail);\n });\n var mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n mq.addEventListener(\"change\", function () {\n if (getMode() === \"system\") apply(\"system\");\n });\n })();\n </script>\n </head>\n <body class=\"min-h-screen bg-background text-foreground\">\n <a\n href=\"#main\"\n class=\"sr-only z-50 rounded-md bg-background px-3 py-2 text-sm font-medium text-foreground outline-none ring-2 ring-ring focus:not-sr-only focus:fixed focus:left-3 focus:top-3\"\n >\n Skip to content\n </a>\n <slot name=\"header\">\n <Header\n site={site}\n submitLabel={submitLabel ?? (site.blueprintConfig ? `Submit ${site.blueprintConfig.labelSingular ?? \"item\"}` : undefined)}\n submitHref={submitHref ?? (site.blueprintConfig ? \"/submit\" : undefined)}\n />\n </slot>\n\n <main id=\"main\">\n <slot />\n </main>\n\n <slot name=\"footer\">\n <Footer\n site={site}\n stats={{\n totalApps: site.stats?.totalApps,\n totalCategories: site.stats?.totalCategories,\n totalStacks: site.stats?.totalStacks,\n totalOwners: site.stats?.totalOwners,\n }}\n itemsLabel={site.blueprintConfig?.labelPlural ?? \"items\"}\n discover={{\n heading: \"Discover\",\n items: [\n ...(site.stats?.totalApps\n ? [{ label: \"Browse all\", href: directoryPath }]\n : []),\n { label: \"Community\", href: \"/contributors\" },\n ...(site.stats?.originalRepo\n ? [{ label: \"View on GitHub\", href: site.stats.originalRepo, external: true }]\n : []),\n ],\n }}\n contribute={{\n heading: \"Contribute\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Submit via GitHub\",\n href: `${site.repoUrl}/blob/main/CONTRIBUTING.md`,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Report an issue\",\n href: `${site.repoUrl}/issues`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n project={{\n heading: \"Project\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Source on GitHub\",\n href: site.repoUrl,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Changelog\",\n href: `${site.repoUrl}/blob/main/CHANGELOG.md`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n />\n </slot>\n\n <slot name=\"body-end\" />\n\n {effectiveGaId && (\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n (function () {\n // GA4's `gtag('config', id)` call in the <head> already auto-pings\n // `page_view` on full navigations, so this block only needs to\n // catch history changes (back/forward). No history.pushState /\n // replaceState wrap: the package does not install\n // @astrojs/transitions' ClientRouter, and those wraps\n // double-fired page_view events on every navigation.\n var last = location.pathname + location.search;\n function report() {\n var next = location.pathname + location.search;\n if (next === last || typeof window.gtag !== \"function\") return;\n last = next;\n window.gtag(\"event\", \"page_view\", {\n page_path: next,\n page_title: document.title,\n page_location: location.href,\n });\n }\n window.addEventListener(\"popstate\", report);\n })();\n </script>\n )}\n </body>\n</html>\n",
57
+ "content": "---\n/**\n * BaseLayout — wraps every page. Owns the theme-detection inline\n * script and the global shell (Header, Footer). Per-page SEO\n * (title, description, OG, JSON-LD) is delegated to `<Seo />` so\n * each page can declare what it needs without polluting the layout\n * file.\n *\n * Generic: takes a `site` prop with brand + nav + stats. No\n * `siteConfig` import — consumers compose the props from their\n * own config (typically `data/generated/site-config.json` for the\n * showcase).\n *\n * GA4 can be configured once through `site.analytics.googleAnalyticsId`\n * or overridden per page with `gaId`. Omit both for privacy-first deployments.\n */\nimport '../styles/system.css';\nimport { derivePrimaryPalette } from '@grove-dev/astro/server';\nimport Footer from './footer.astro';\nimport Header from './header.astro';\nimport Seo from './seo.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface SiteStats {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n repositoryStars?: number;\n repositoryForks?: number;\n repositoryContributors?: number;\n originalRepo?: string;\n originalStars?: number;\n originalForks?: number;\n originalContributors?: number;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n nav: NavItem[];\n footer?: {\n columns?: Array<{\n heading: string;\n items: Array<{ label: string; href: string; external?: boolean }>;\n }>;\n copyright?: string;\n license?: string;\n };\n submission?: {\n eyebrow?: string;\n title?: string;\n description?: string;\n good?: string[];\n avoid?: string[];\n };\n repoUrl?: string;\n url?: string;\n /** Header logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n /** Favicon path under `public/` (e.g. `/favicon.svg`). */\n favicon?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives `<html lang>` and og:locale. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n analytics?: {\n googleAnalyticsId?: string;\n };\n /** Optional directory-level stats — populated from site-config.json\n * at generate time. Components use it to render hero counts,\n * origin card stats, and footer summary lines. */\n stats?: SiteStats;\n /** Theme knobs from grove.config.ts — resolved into CSS custom\n * properties on `<html>` so the package stylesheet picks them up.\n * Values are plain strings because the prop usually arrives from a\n * JSON import; unknown values fall back to the package defaults. */\n theme?: {\n primaryColor?: string;\n /** \"none\" | \"soft\" | \"round\" */\n radius?: string;\n /** \"compact\" | \"comfortable\" | \"spacious\" */\n density?: string;\n containerWidth?: string;\n };\n blueprintConfig?: {\n routeSlug?: string;\n labelSingular?: string;\n labelPlural?: string;\n };\n}\n\ninterface Props {\n title: string;\n description: string;\n site: Site;\n type?: 'website' | 'article' | 'profile';\n noindex?: boolean;\n /** Exact robots meta value (e.g. a page model's `seo.robots`); wins over `noindex`. */\n robots?: string;\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n /** Open Graph / Twitter image path (e.g. \"/og/records/foo.png\").\n * Defaults to the site-wide /og-image.svg inside <Seo />. */\n image?: string;\n /** Alt text for the OG/Twitter image. */\n imageAlt?: string;\n /** Optional Google Analytics 4 Measurement ID (e.g. \"G-XXXXXX\"). */\n gaId?: string;\n /** Path used for JSON-LD `SearchAction` target. Defaults to \"/items\". */\n searchPath?: string;\n /** Submit button label rendered in the header. Omit to hide. */\n submitLabel?: string;\n /** Submit button href rendered in the header. */\n submitHref?: string;\n}\n\nconst {\n title,\n description,\n site,\n type,\n noindex,\n robots,\n jsonLd,\n image,\n imageAlt,\n gaId,\n searchPath,\n submitLabel,\n submitHref,\n} = Astro.props;\nconst directoryPath = searchPath ?? `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst effectiveGaId = gaId ?? site.analytics?.googleAnalyticsId;\n\n// ── Theme wiring ─────────────────────────────────────────────────\n// `theme.*` from grove.config.ts resolves to CSS custom properties\n// on the <html> style attribute. An attribute (not an inline\n// <style>) so the override wins over the bundled stylesheet\n// regardless of how Vite orders the CSS output.\nconst RADIUS_PRESETS: Record<string, [string, string, string]> = {\n none: ['0rem', '0rem', '0rem'],\n soft: ['0.625rem', '0.5rem', '0.75rem'],\n round: ['0.875rem', '0.75rem', '1rem'],\n};\nconst DENSITY_SPACING: Record<string, string> = {\n compact: '0.225rem',\n comfortable: '0.25rem',\n spacious: '0.28rem',\n};\n\n// Brand fill and text derive from ONE WCAG computation (contrast.ts)\n// so background and foreground can never drift apart across themes.\n\nconst themeConfig = site.theme;\nconst themeStyleParts: string[] = [];\nif (themeConfig) {\n const radius = RADIUS_PRESETS[themeConfig.radius ?? 'soft'];\n if (radius && themeConfig.radius && themeConfig.radius !== 'soft') {\n themeStyleParts.push(\n `--grove-radius: ${radius[0]}`,\n `--grove-radius-lg: ${radius[1]}`,\n `--grove-radius-xl: ${radius[2]}`,\n );\n }\n const spacing = DENSITY_SPACING[themeConfig.density ?? 'comfortable'];\n if (spacing && themeConfig.density && themeConfig.density !== 'comfortable') {\n themeStyleParts.push(`--spacing: ${spacing}`);\n }\n if (themeConfig.containerWidth) {\n themeStyleParts.push(`--grove-container: ${themeConfig.containerWidth}`);\n }\n const primary = themeConfig.primaryColor;\n if (typeof primary === 'string' && /^#[0-9a-fA-F]{3,8}$/.test(primary)) {\n const palette = derivePrimaryPalette(primary);\n if (palette) {\n themeStyleParts.push(\n `--grove-theme-primary: ${palette.solid}`,\n `--grove-theme-primary-foreground: ${palette.solidForeground}`,\n `--grove-theme-primary-dark: ${palette.dark}`,\n `--grove-theme-primary-dark-foreground: ${palette.darkForeground}`,\n );\n }\n }\n}\nconst themeStyle = themeStyleParts.length > 0 ? `${themeStyleParts.join('; ')};` : undefined;\n\n// `site.favicon` points at a file the consumer owns under `public/`.\n// The fallback is a generated square — tinted with the configured\n// brand color rather than a hardcoded near-black, so an unconfigured\n// site still gets a tab mark that is recognisably its own.\nconst faviconFill = (site.theme?.primaryColor ?? '#18181b').trim();\nconst favicon =\n site.favicon ??\n `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='${encodeURIComponent(faviconFill)}'/%3E%3C/svg%3E`;\n---\n\n<!doctype html>\n<html lang={site.locale ?? 'en'} style={themeStyle}>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta name=\"theme-color\" content=\"#0a0a0c\" media=\"(prefers-color-scheme: dark)\" />\n <meta name=\"theme-color\" content=\"#fafafa\" media=\"(prefers-color-scheme: light)\" />\n <link rel=\"icon\" href={favicon} />\n <link rel=\"sitemap\" href=\"/sitemap.xml\" />\n {/* Preconnect to GitHub's avatar CDN — most pages render at least\n one avatar (record list cards, detail page logo) and the\n connection is reusable across cards. Cross-origin only, no\n document fetch, so the cost is one TLS handshake per page. */}\n <link rel=\"preconnect\" href=\"https://avatars.githubusercontent.com\" crossorigin=\"anonymous\" />\n <link\n rel=\"alternate\"\n type=\"text/plain\"\n href=\"/llms.txt\"\n title=\"LLM usage guidance\"\n />\n\n {effectiveGaId && (\n <>\n <script\n is:inline\n async\n src={`https://www.googletagmanager.com/gtag/js?id=${effectiveGaId}`}\n />\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n window.dataLayer = window.dataLayer || [];\n // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = function gtag() {\n dataLayer.push(arguments);\n };\n gtag(\"js\", new Date());\n gtag(\"config\", gaId, {\n page_path: window.location.pathname + window.location.search,\n page_title: document.title,\n });\n </script>\n </>\n )}\n\n <Seo\n title={title}\n description={description}\n type={type}\n noindex={noindex}\n robots={robots}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\n searchPath={directoryPath}\n />\n\n <slot name=\"head\" />\n\n <script is:inline>\n // THEME_INIT — runs before paint so the user never sees a\n // flash of the wrong theme. State is persisted in localStorage\n // under the key \"grove-theme\" (matching ThemeToggle.astro).\n (function () {\n var STORAGE_KEY = \"grove-theme\";\n function getMode() {\n try {\n var stored = localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\")\n return stored;\n } catch (e) {\n // localStorage may be blocked (private mode, etc.) —\n // fall through to the system default.\n }\n return \"system\";\n }\n function apply(mode) {\n var resolved =\n mode === \"system\"\n ? (window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\")\n : mode;\n var root = document.documentElement;\n if (resolved === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n root.dataset.theme = mode;\n root.dataset.resolvedTheme = resolved;\n }\n apply(getMode());\n window.addEventListener(\"theme:set\", function (e) {\n apply(e.detail);\n });\n var mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n mq.addEventListener(\"change\", function () {\n if (getMode() === \"system\") apply(\"system\");\n });\n })();\n </script>\n </head>\n <body class=\"min-h-screen bg-background text-foreground\">\n <a\n href=\"#main\"\n class=\"sr-only z-50 rounded-md bg-background px-3 py-2 text-sm font-medium text-foreground outline-none ring-2 ring-ring focus:not-sr-only focus:fixed focus:left-3 focus:top-3\"\n >\n Skip to content\n </a>\n <slot name=\"header\">\n <Header\n site={site}\n submitLabel={submitLabel ?? (site.blueprintConfig ? `Submit ${site.blueprintConfig.labelSingular ?? \"item\"}` : undefined)}\n submitHref={submitHref ?? (site.blueprintConfig ? \"/submit\" : undefined)}\n />\n </slot>\n\n <main id=\"main\">\n <slot />\n </main>\n\n <slot name=\"footer\">\n <Footer\n site={site}\n stats={{\n totalApps: site.stats?.totalApps,\n totalCategories: site.stats?.totalCategories,\n totalStacks: site.stats?.totalStacks,\n totalOwners: site.stats?.totalOwners,\n }}\n itemsLabel={site.blueprintConfig?.labelPlural ?? \"items\"}\n discover={{\n heading: \"Discover\",\n items: [\n ...(site.stats?.totalApps\n ? [{ label: \"Browse all\", href: directoryPath }]\n : []),\n { label: \"Community\", href: \"/contributors\" },\n ...(site.stats?.originalRepo\n ? [{ label: \"View on GitHub\", href: site.stats.originalRepo, external: true }]\n : []),\n ],\n }}\n contribute={{\n heading: \"Contribute\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Submit via GitHub\",\n href: `${site.repoUrl}/blob/main/CONTRIBUTING.md`,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Report an issue\",\n href: `${site.repoUrl}/issues`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n project={{\n heading: \"Project\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Source on GitHub\",\n href: site.repoUrl,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Changelog\",\n href: `${site.repoUrl}/blob/main/CHANGELOG.md`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n />\n </slot>\n\n <slot name=\"body-end\" />\n\n {effectiveGaId && (\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n (function () {\n // GA4's `gtag('config', id)` call in the <head> already auto-pings\n // `page_view` on full navigations, so this block only needs to\n // catch history changes (back/forward). No history.pushState /\n // replaceState wrap: the package does not install\n // @astrojs/transitions' ClientRouter, and those wraps\n // double-fired page_view events on every navigation.\n var last = location.pathname + location.search;\n function report() {\n var next = location.pathname + location.search;\n if (next === last || typeof window.gtag !== \"function\") return;\n last = next;\n window.gtag(\"event\", \"page_view\", {\n page_path: next,\n page_title: document.title,\n page_location: location.href,\n });\n }\n window.addEventListener(\"popstate\", report);\n })();\n </script>\n )}\n </body>\n</html>\n",
58
58
  "type": "registry:component",
59
59
  "target": "~/src/layouts/base-layout.astro"
60
60
  },
@@ -84,7 +84,7 @@
84
84
  },
85
85
  {
86
86
  "path": "default/layouts/seo.astro",
87
- "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareSourceCode\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n jsonLd,\n} = Astro.props;\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n{noindex ? (\n <meta name=\"robots\" content=\"noindex,nofollow\" />\n) : (\n <meta name=\"robots\" content=\"index,follow,max-image-preview:large\" />\n)}\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareSourceCode, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
87
+ "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
88
88
  "type": "registry:component",
89
89
  "target": "~/src/layouts/seo.astro"
90
90
  },
@@ -150,7 +150,7 @@
150
150
  },
151
151
  {
152
152
  "path": "default/pages/categories/[name].astro",
153
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const categories = siteConfig.taxonomy?.categories ?? [];\n // A category no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return categories\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('categories', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
153
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const categories = siteConfig.taxonomy?.categories ?? [];\n // A category no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return categories\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('categories', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
154
154
  "type": "registry:page",
155
155
  "target": "~/src/pages/categories/[name].astro"
156
156
  },
@@ -162,7 +162,7 @@
162
162
  },
163
163
  {
164
164
  "path": "default/pages/stacks/[name].astro",
165
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const stacks = siteConfig.taxonomy?.stacks ?? [];\n // A stack no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return stacks\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('stacks', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
165
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const stacks = siteConfig.taxonomy?.stacks ?? [];\n // A stack no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return stacks\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('stacks', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
166
166
  "type": "registry:page",
167
167
  "target": "~/src/pages/stacks/[name].astro"
168
168
  },
@@ -198,7 +198,7 @@
198
198
  },
199
199
  {
200
200
  "path": "default/pages/collections/[slug].astro",
201
- "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
201
+ "content": "---\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getCollectionBodyHtml,\n getCollectionPageModel,\n loadCollections,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport CollectionPage from '../../components/grove/collection-page.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport async function getStaticPaths() {\n const collections = await loadCollections(process.cwd());\n return collections.map((c) => ({ params: { slug: c.slug } }));\n}\n\nconst { slug } = Astro.params;\nconst collections = await loadCollections(process.cwd());\nconst collection = collections.find((c) => c.slug === slug);\nif (!collection) return Astro.redirect('/404');\n\nconst entries = recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n);\nconst model = getCollectionPageModel(collection, entries, collections, siteConfig);\nconst bodyHtml = getCollectionBodyHtml(collection.content);\n---\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <CollectionPage\n model={model}\n bodyHtml={bodyHtml}\n eyebrow={model.collection.kind === \"curated\" ? \"Curated collection\" : \"Generated collection\"}\n countNoun={{\n singular: siteConfig.blueprintConfig?.labelSingular ?? \"item\",\n plural: siteConfig.blueprintConfig?.labelPlural ?? \"items\",\n }}\n />\n</BaseLayout>\n",
202
202
  "type": "registry:page",
203
203
  "target": "~/src/pages/collections/[slug].astro"
204
204
  },
@@ -366,7 +366,7 @@
366
366
  },
367
367
  {
368
368
  "path": "default/pages/[slug]/[recordSlug].astro",
369
- "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
369
+ "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n noindex={seo.noindex}\n robots={seo.robots}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
370
370
  "type": "registry:page",
371
371
  "target": "~/src/pages/[slug]/[recordSlug].astro"
372
372
  },
@@ -457,7 +457,7 @@
457
457
  ],
458
458
  "meta": {
459
459
  "version": "1.3.0",
460
- "requiresGrove": "0.17.0"
460
+ "requiresGrove": "0.18.0"
461
461
  },
462
462
  "type": "registry:block"
463
463
  }
package/dist/r/home.json CHANGED
@@ -62,7 +62,7 @@
62
62
  ],
63
63
  "meta": {
64
64
  "version": "1.3.0",
65
- "requiresGrove": "0.17.0"
65
+ "requiresGrove": "0.18.0"
66
66
  },
67
67
  "type": "registry:block"
68
68
  }
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "meta": {
19
19
  "version": "1.3.0",
20
- "requiresGrove": "0.17.0"
20
+ "requiresGrove": "0.18.0"
21
21
  },
22
22
  "type": "registry:block"
23
23
  }
@@ -43,7 +43,7 @@
43
43
  ],
44
44
  "meta": {
45
45
  "version": "1.3.0",
46
- "requiresGrove": "0.17.0"
46
+ "requiresGrove": "0.18.0"
47
47
  },
48
48
  "type": "registry:block"
49
49
  }
@@ -11,7 +11,7 @@
11
11
  "files": [
12
12
  {
13
13
  "path": "default/pages/[slug]/[recordSlug].astro",
14
- "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
14
+ "content": "---\n/**\n * Detail page — thin consumer wiring up the package's\n * RecordHeader, EditorialSummary, TableOfContents, MarkdownBody,\n * and RecordSidebar components. All rendering logic, prose\n * styling, sidebar visibility, and activity-badge rules live in\n * `@grove-dev/astro`; this file only composes them.\n */\nimport records from '@grove/generated/records.json';\nimport siteConfig from '@grove/generated/site-config.json';\nimport {\n getRecordContextModel,\n getRecordDetailModel,\n loadCollections,\n recordDetailPaths,\n recordsToCollectionEntries,\n} from '@grove-dev/astro/server';\nimport EditorialSummary from '../../components/grove/editorial-summary.astro';\nimport MarkdownBody from '../../components/grove/markdown-body.astro';\nimport RecordHeader from '../../components/grove/record-header.astro';\nimport RecordRelations from '../../components/grove/record-relations.astro';\nimport RecordSidebar from '../../components/grove/record-sidebar.astro';\nimport RelatedRecords from '../../components/grove/related-records.astro';\nimport TableOfContents from '../../components/grove/table-of-contents.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n return recordDetailPaths(siteConfig);\n}\n\nconst dirSlug = siteConfig.blueprintConfig?.routeSlug ?? 'projects';\nconst detail = getRecordDetailModel(\n Astro.params.recordSlug ?? '',\n siteConfig,\n Astro.params.slug ?? dirSlug,\n);\nif (!detail) return Astro.redirect(`/${dirSlug}`);\nconst { record, itemSingular, seo } = detail;\n\n// Where this page links out to: subject hubs, sibling records, and the\n// collections the record appears in.\nconst context = getRecordContextModel(record, {\n collections: await loadCollections(process.cwd()),\n entries: recordsToCollectionEntries(\n (records as { records: unknown[] }).records as never,\n siteConfig,\n ),\n subjects: siteConfig.taxonomy?.subjects ?? [],\n});\n---\n\n<BaseLayout\n title={seo.title}\n description={seo.description}\n image={seo.image}\n imageAlt={seo.imageAlt}\n site={siteConfig}\n type=\"article\"\n jsonLd={seo.jsonLd}\n noindex={seo.noindex}\n robots={seo.robots}\n submitHref=\"/submit\"\n submitLabel={`Submit ${itemSingular}`}\n>\n <article class=\"py-8 sm:py-10\">\n <div class=\"mx-auto w-full max-w-container px-5 sm:px-7\">\n <RecordHeader detail={detail} />\n <RecordRelations relations={context.relations} />\n\n <div\n class=\"grid grid-cols-1 gap-10 lg:grid-cols-[minmax(0,1fr)_300px] lg:gap-12\"\n >\n {/* Reading column: editorial context, then the article —\n no TOC panel pushing the body down. */}\n <div class=\"min-w-0\">\n <EditorialSummary\n bestFor={detail.bestFor}\n caveats={detail.caveats}\n whyListed={detail.whyListed}\n />\n <MarkdownBody\n recordSlug={record.slug}\n fallback={record.content ? \"This record doesn't have notes yet.\" : undefined}\n />\n </div>\n {/* Right rail: the TOC and nothing else. */}\n <div class=\"min-w-0 lg:sticky lg:top-20 lg:max-h-[calc(100vh-5rem)] lg:self-start lg:overflow-y-auto\">\n <TableOfContents items={detail.toc} />\n </div>\n </div>\n\n <RelatedRecords context={context} />\n\n {/* Metadata panels — full width below the article. */}\n <section class=\"mt-12 border-t border-border pt-8\" aria-label=\"Project details\">\n <RecordSidebar detail={detail} sticky={false} layout=\"grid\" />\n </section>\n </div>\n </article>\n</BaseLayout>\n",
15
15
  "type": "registry:page",
16
16
  "target": "~/src/pages/[slug]/[recordSlug].astro"
17
17
  },
@@ -66,7 +66,7 @@
66
66
  ],
67
67
  "meta": {
68
68
  "version": "1.3.0",
69
- "requiresGrove": "0.17.0"
69
+ "requiresGrove": "0.18.0"
70
70
  },
71
71
  "type": "registry:block"
72
72
  }
@@ -47,7 +47,7 @@
47
47
  ],
48
48
  "meta": {
49
49
  "version": "1.3.0",
50
- "requiresGrove": "0.17.0"
50
+ "requiresGrove": "0.18.0"
51
51
  }
52
52
  },
53
53
  {
@@ -113,7 +113,7 @@
113
113
  ],
114
114
  "meta": {
115
115
  "version": "1.3.0",
116
- "requiresGrove": "0.17.0"
116
+ "requiresGrove": "0.18.0"
117
117
  }
118
118
  },
119
119
  {
@@ -155,7 +155,7 @@
155
155
  ],
156
156
  "meta": {
157
157
  "version": "1.3.0",
158
- "requiresGrove": "0.17.0"
158
+ "requiresGrove": "0.18.0"
159
159
  }
160
160
  },
161
161
  {
@@ -213,7 +213,7 @@
213
213
  ],
214
214
  "meta": {
215
215
  "version": "1.3.0",
216
- "requiresGrove": "0.17.0"
216
+ "requiresGrove": "0.18.0"
217
217
  }
218
218
  },
219
219
  {
@@ -265,7 +265,7 @@
265
265
  ],
266
266
  "meta": {
267
267
  "version": "1.3.0",
268
- "requiresGrove": "0.17.0"
268
+ "requiresGrove": "0.18.0"
269
269
  }
270
270
  },
271
271
  {
@@ -324,7 +324,7 @@
324
324
  ],
325
325
  "meta": {
326
326
  "version": "1.3.0",
327
- "requiresGrove": "0.17.0"
327
+ "requiresGrove": "0.18.0"
328
328
  }
329
329
  },
330
330
  {
@@ -411,7 +411,7 @@
411
411
  ],
412
412
  "meta": {
413
413
  "version": "1.3.0",
414
- "requiresGrove": "0.17.0"
414
+ "requiresGrove": "0.18.0"
415
415
  }
416
416
  },
417
417
  {
@@ -473,7 +473,7 @@
473
473
  ],
474
474
  "meta": {
475
475
  "version": "1.3.0",
476
- "requiresGrove": "0.17.0"
476
+ "requiresGrove": "0.18.0"
477
477
  }
478
478
  },
479
479
  {
@@ -499,7 +499,7 @@
499
499
  ],
500
500
  "meta": {
501
501
  "version": "1.3.0",
502
- "requiresGrove": "0.17.0"
502
+ "requiresGrove": "0.18.0"
503
503
  }
504
504
  },
505
505
  {
@@ -520,7 +520,7 @@
520
520
  ],
521
521
  "meta": {
522
522
  "version": "1.3.0",
523
- "requiresGrove": "0.17.0"
523
+ "requiresGrove": "0.18.0"
524
524
  }
525
525
  },
526
526
  {
@@ -541,7 +541,7 @@
541
541
  ],
542
542
  "meta": {
543
543
  "version": "1.3.0",
544
- "requiresGrove": "0.17.0"
544
+ "requiresGrove": "0.18.0"
545
545
  }
546
546
  },
547
547
  {
@@ -562,7 +562,7 @@
562
562
  ],
563
563
  "meta": {
564
564
  "version": "1.3.0",
565
- "requiresGrove": "0.17.0"
565
+ "requiresGrove": "0.18.0"
566
566
  }
567
567
  },
568
568
  {
@@ -950,7 +950,7 @@
950
950
  ],
951
951
  "meta": {
952
952
  "version": "1.3.0",
953
- "requiresGrove": "0.17.0"
953
+ "requiresGrove": "0.18.0"
954
954
  }
955
955
  }
956
956
  ]
package/dist/r/shell.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "files": [
16
16
  {
17
17
  "path": "default/layouts/base-layout.astro",
18
- "content": "---\n/**\n * BaseLayout — wraps every page. Owns the theme-detection inline\n * script and the global shell (Header, Footer). Per-page SEO\n * (title, description, OG, JSON-LD) is delegated to `<Seo />` so\n * each page can declare what it needs without polluting the layout\n * file.\n *\n * Generic: takes a `site` prop with brand + nav + stats. No\n * `siteConfig` import — consumers compose the props from their\n * own config (typically `data/generated/site-config.json` for the\n * showcase).\n *\n * GA4 can be configured once through `site.analytics.googleAnalyticsId`\n * or overridden per page with `gaId`. Omit both for privacy-first deployments.\n */\nimport '../styles/system.css';\nimport { derivePrimaryPalette } from '@grove-dev/astro/server';\nimport Footer from './footer.astro';\nimport Header from './header.astro';\nimport Seo from './seo.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface SiteStats {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n repositoryStars?: number;\n repositoryForks?: number;\n repositoryContributors?: number;\n originalRepo?: string;\n originalStars?: number;\n originalForks?: number;\n originalContributors?: number;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n nav: NavItem[];\n footer?: {\n columns?: Array<{\n heading: string;\n items: Array<{ label: string; href: string; external?: boolean }>;\n }>;\n copyright?: string;\n license?: string;\n };\n submission?: {\n eyebrow?: string;\n title?: string;\n description?: string;\n good?: string[];\n avoid?: string[];\n };\n repoUrl?: string;\n url?: string;\n /** Header logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n /** Favicon path under `public/` (e.g. `/favicon.svg`). */\n favicon?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives `<html lang>` and og:locale. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n analytics?: {\n googleAnalyticsId?: string;\n };\n /** Optional directory-level stats — populated from site-config.json\n * at generate time. Components use it to render hero counts,\n * origin card stats, and footer summary lines. */\n stats?: SiteStats;\n /** Theme knobs from grove.config.ts — resolved into CSS custom\n * properties on `<html>` so the package stylesheet picks them up.\n * Values are plain strings because the prop usually arrives from a\n * JSON import; unknown values fall back to the package defaults. */\n theme?: {\n primaryColor?: string;\n /** \"none\" | \"soft\" | \"round\" */\n radius?: string;\n /** \"compact\" | \"comfortable\" | \"spacious\" */\n density?: string;\n containerWidth?: string;\n };\n blueprintConfig?: {\n routeSlug?: string;\n labelSingular?: string;\n labelPlural?: string;\n };\n}\n\ninterface Props {\n title: string;\n description: string;\n site: Site;\n type?: 'website' | 'article' | 'profile';\n noindex?: boolean;\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n /** Open Graph / Twitter image path (e.g. \"/og/records/foo.png\").\n * Defaults to the site-wide /og-image.svg inside <Seo />. */\n image?: string;\n /** Alt text for the OG/Twitter image. */\n imageAlt?: string;\n /** Optional Google Analytics 4 Measurement ID (e.g. \"G-XXXXXX\"). */\n gaId?: string;\n /** Path used for JSON-LD `SearchAction` target. Defaults to \"/items\". */\n searchPath?: string;\n /** Submit button label rendered in the header. Omit to hide. */\n submitLabel?: string;\n /** Submit button href rendered in the header. */\n submitHref?: string;\n}\n\nconst {\n title,\n description,\n site,\n type,\n noindex,\n jsonLd,\n image,\n imageAlt,\n gaId,\n searchPath,\n submitLabel,\n submitHref,\n} = Astro.props;\nconst directoryPath = searchPath ?? `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst effectiveGaId = gaId ?? site.analytics?.googleAnalyticsId;\n\n// ── Theme wiring ─────────────────────────────────────────────────\n// `theme.*` from grove.config.ts resolves to CSS custom properties\n// on the <html> style attribute. An attribute (not an inline\n// <style>) so the override wins over the bundled stylesheet\n// regardless of how Vite orders the CSS output.\nconst RADIUS_PRESETS: Record<string, [string, string, string]> = {\n none: ['0rem', '0rem', '0rem'],\n soft: ['0.625rem', '0.5rem', '0.75rem'],\n round: ['0.875rem', '0.75rem', '1rem'],\n};\nconst DENSITY_SPACING: Record<string, string> = {\n compact: '0.225rem',\n comfortable: '0.25rem',\n spacious: '0.28rem',\n};\n\n// Brand fill and text derive from ONE WCAG computation (contrast.ts)\n// so background and foreground can never drift apart across themes.\n\nconst themeConfig = site.theme;\nconst themeStyleParts: string[] = [];\nif (themeConfig) {\n const radius = RADIUS_PRESETS[themeConfig.radius ?? 'soft'];\n if (radius && themeConfig.radius && themeConfig.radius !== 'soft') {\n themeStyleParts.push(\n `--grove-radius: ${radius[0]}`,\n `--grove-radius-lg: ${radius[1]}`,\n `--grove-radius-xl: ${radius[2]}`,\n );\n }\n const spacing = DENSITY_SPACING[themeConfig.density ?? 'comfortable'];\n if (spacing && themeConfig.density && themeConfig.density !== 'comfortable') {\n themeStyleParts.push(`--spacing: ${spacing}`);\n }\n if (themeConfig.containerWidth) {\n themeStyleParts.push(`--grove-container: ${themeConfig.containerWidth}`);\n }\n const primary = themeConfig.primaryColor;\n if (typeof primary === 'string' && /^#[0-9a-fA-F]{3,8}$/.test(primary)) {\n const palette = derivePrimaryPalette(primary);\n if (palette) {\n themeStyleParts.push(\n `--grove-theme-primary: ${palette.solid}`,\n `--grove-theme-primary-foreground: ${palette.solidForeground}`,\n `--grove-theme-primary-dark: ${palette.dark}`,\n `--grove-theme-primary-dark-foreground: ${palette.darkForeground}`,\n );\n }\n }\n}\nconst themeStyle = themeStyleParts.length > 0 ? `${themeStyleParts.join('; ')};` : undefined;\n\n// `site.favicon` points at a file the consumer owns under `public/`.\n// The fallback is a generated square — tinted with the configured\n// brand color rather than a hardcoded near-black, so an unconfigured\n// site still gets a tab mark that is recognisably its own.\nconst faviconFill = (site.theme?.primaryColor ?? '#18181b').trim();\nconst favicon =\n site.favicon ??\n `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='${encodeURIComponent(faviconFill)}'/%3E%3C/svg%3E`;\n---\n\n<!doctype html>\n<html lang={site.locale ?? 'en'} style={themeStyle}>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta name=\"theme-color\" content=\"#0a0a0c\" media=\"(prefers-color-scheme: dark)\" />\n <meta name=\"theme-color\" content=\"#fafafa\" media=\"(prefers-color-scheme: light)\" />\n <link rel=\"icon\" href={favicon} />\n <link rel=\"sitemap\" href=\"/sitemap.xml\" />\n {/* Preconnect to GitHub's avatar CDN — most pages render at least\n one avatar (record list cards, detail page logo) and the\n connection is reusable across cards. Cross-origin only, no\n document fetch, so the cost is one TLS handshake per page. */}\n <link rel=\"preconnect\" href=\"https://avatars.githubusercontent.com\" crossorigin=\"anonymous\" />\n <link\n rel=\"alternate\"\n type=\"text/plain\"\n href=\"/llms.txt\"\n title=\"LLM usage guidance\"\n />\n\n {effectiveGaId && (\n <>\n <script\n is:inline\n async\n src={`https://www.googletagmanager.com/gtag/js?id=${effectiveGaId}`}\n />\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n window.dataLayer = window.dataLayer || [];\n // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = function gtag() {\n dataLayer.push(arguments);\n };\n gtag(\"js\", new Date());\n gtag(\"config\", gaId, {\n page_path: window.location.pathname + window.location.search,\n page_title: document.title,\n });\n </script>\n </>\n )}\n\n <Seo\n title={title}\n description={description}\n type={type}\n noindex={noindex}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\n searchPath={directoryPath}\n />\n\n <slot name=\"head\" />\n\n <script is:inline>\n // THEME_INIT — runs before paint so the user never sees a\n // flash of the wrong theme. State is persisted in localStorage\n // under the key \"grove-theme\" (matching ThemeToggle.astro).\n (function () {\n var STORAGE_KEY = \"grove-theme\";\n function getMode() {\n try {\n var stored = localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\")\n return stored;\n } catch (e) {\n // localStorage may be blocked (private mode, etc.) —\n // fall through to the system default.\n }\n return \"system\";\n }\n function apply(mode) {\n var resolved =\n mode === \"system\"\n ? (window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\")\n : mode;\n var root = document.documentElement;\n if (resolved === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n root.dataset.theme = mode;\n root.dataset.resolvedTheme = resolved;\n }\n apply(getMode());\n window.addEventListener(\"theme:set\", function (e) {\n apply(e.detail);\n });\n var mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n mq.addEventListener(\"change\", function () {\n if (getMode() === \"system\") apply(\"system\");\n });\n })();\n </script>\n </head>\n <body class=\"min-h-screen bg-background text-foreground\">\n <a\n href=\"#main\"\n class=\"sr-only z-50 rounded-md bg-background px-3 py-2 text-sm font-medium text-foreground outline-none ring-2 ring-ring focus:not-sr-only focus:fixed focus:left-3 focus:top-3\"\n >\n Skip to content\n </a>\n <slot name=\"header\">\n <Header\n site={site}\n submitLabel={submitLabel ?? (site.blueprintConfig ? `Submit ${site.blueprintConfig.labelSingular ?? \"item\"}` : undefined)}\n submitHref={submitHref ?? (site.blueprintConfig ? \"/submit\" : undefined)}\n />\n </slot>\n\n <main id=\"main\">\n <slot />\n </main>\n\n <slot name=\"footer\">\n <Footer\n site={site}\n stats={{\n totalApps: site.stats?.totalApps,\n totalCategories: site.stats?.totalCategories,\n totalStacks: site.stats?.totalStacks,\n totalOwners: site.stats?.totalOwners,\n }}\n itemsLabel={site.blueprintConfig?.labelPlural ?? \"items\"}\n discover={{\n heading: \"Discover\",\n items: [\n ...(site.stats?.totalApps\n ? [{ label: \"Browse all\", href: directoryPath }]\n : []),\n { label: \"Community\", href: \"/contributors\" },\n ...(site.stats?.originalRepo\n ? [{ label: \"View on GitHub\", href: site.stats.originalRepo, external: true }]\n : []),\n ],\n }}\n contribute={{\n heading: \"Contribute\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Submit via GitHub\",\n href: `${site.repoUrl}/blob/main/CONTRIBUTING.md`,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Report an issue\",\n href: `${site.repoUrl}/issues`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n project={{\n heading: \"Project\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Source on GitHub\",\n href: site.repoUrl,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Changelog\",\n href: `${site.repoUrl}/blob/main/CHANGELOG.md`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n />\n </slot>\n\n <slot name=\"body-end\" />\n\n {effectiveGaId && (\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n (function () {\n // GA4's `gtag('config', id)` call in the <head> already auto-pings\n // `page_view` on full navigations, so this block only needs to\n // catch history changes (back/forward). No history.pushState /\n // replaceState wrap: the package does not install\n // @astrojs/transitions' ClientRouter, and those wraps\n // double-fired page_view events on every navigation.\n var last = location.pathname + location.search;\n function report() {\n var next = location.pathname + location.search;\n if (next === last || typeof window.gtag !== \"function\") return;\n last = next;\n window.gtag(\"event\", \"page_view\", {\n page_path: next,\n page_title: document.title,\n page_location: location.href,\n });\n }\n window.addEventListener(\"popstate\", report);\n })();\n </script>\n )}\n </body>\n</html>\n",
18
+ "content": "---\n/**\n * BaseLayout — wraps every page. Owns the theme-detection inline\n * script and the global shell (Header, Footer). Per-page SEO\n * (title, description, OG, JSON-LD) is delegated to `<Seo />` so\n * each page can declare what it needs without polluting the layout\n * file.\n *\n * Generic: takes a `site` prop with brand + nav + stats. No\n * `siteConfig` import — consumers compose the props from their\n * own config (typically `data/generated/site-config.json` for the\n * showcase).\n *\n * GA4 can be configured once through `site.analytics.googleAnalyticsId`\n * or overridden per page with `gaId`. Omit both for privacy-first deployments.\n */\nimport '../styles/system.css';\nimport { derivePrimaryPalette } from '@grove-dev/astro/server';\nimport Footer from './footer.astro';\nimport Header from './header.astro';\nimport Seo from './seo.astro';\n\ninterface NavItem {\n label: string;\n href: string;\n}\n\ninterface SiteStats {\n totalApps?: number;\n totalCategories?: number;\n totalStacks?: number;\n totalOwners?: number;\n totalStars?: number;\n repositoryStars?: number;\n repositoryForks?: number;\n repositoryContributors?: number;\n originalRepo?: string;\n originalStars?: number;\n originalForks?: number;\n originalContributors?: number;\n}\n\ninterface Site {\n name: string;\n tagline?: string;\n description?: string;\n nav: NavItem[];\n footer?: {\n columns?: Array<{\n heading: string;\n items: Array<{ label: string; href: string; external?: boolean }>;\n }>;\n copyright?: string;\n license?: string;\n };\n submission?: {\n eyebrow?: string;\n title?: string;\n description?: string;\n good?: string[];\n avoid?: string[];\n };\n repoUrl?: string;\n url?: string;\n /** Header logo path under `public/` (e.g. `/logo.svg`). */\n logo?: string;\n /** Favicon path under `public/` (e.g. `/favicon.svg`). */\n favicon?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives `<html lang>` and og:locale. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n analytics?: {\n googleAnalyticsId?: string;\n };\n /** Optional directory-level stats — populated from site-config.json\n * at generate time. Components use it to render hero counts,\n * origin card stats, and footer summary lines. */\n stats?: SiteStats;\n /** Theme knobs from grove.config.ts — resolved into CSS custom\n * properties on `<html>` so the package stylesheet picks them up.\n * Values are plain strings because the prop usually arrives from a\n * JSON import; unknown values fall back to the package defaults. */\n theme?: {\n primaryColor?: string;\n /** \"none\" | \"soft\" | \"round\" */\n radius?: string;\n /** \"compact\" | \"comfortable\" | \"spacious\" */\n density?: string;\n containerWidth?: string;\n };\n blueprintConfig?: {\n routeSlug?: string;\n labelSingular?: string;\n labelPlural?: string;\n };\n}\n\ninterface Props {\n title: string;\n description: string;\n site: Site;\n type?: 'website' | 'article' | 'profile';\n noindex?: boolean;\n /** Exact robots meta value (e.g. a page model's `seo.robots`); wins over `noindex`. */\n robots?: string;\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n /** Open Graph / Twitter image path (e.g. \"/og/records/foo.png\").\n * Defaults to the site-wide /og-image.svg inside <Seo />. */\n image?: string;\n /** Alt text for the OG/Twitter image. */\n imageAlt?: string;\n /** Optional Google Analytics 4 Measurement ID (e.g. \"G-XXXXXX\"). */\n gaId?: string;\n /** Path used for JSON-LD `SearchAction` target. Defaults to \"/items\". */\n searchPath?: string;\n /** Submit button label rendered in the header. Omit to hide. */\n submitLabel?: string;\n /** Submit button href rendered in the header. */\n submitHref?: string;\n}\n\nconst {\n title,\n description,\n site,\n type,\n noindex,\n robots,\n jsonLd,\n image,\n imageAlt,\n gaId,\n searchPath,\n submitLabel,\n submitHref,\n} = Astro.props;\nconst directoryPath = searchPath ?? `/${site.blueprintConfig?.routeSlug ?? 'items'}`;\nconst effectiveGaId = gaId ?? site.analytics?.googleAnalyticsId;\n\n// ── Theme wiring ─────────────────────────────────────────────────\n// `theme.*` from grove.config.ts resolves to CSS custom properties\n// on the <html> style attribute. An attribute (not an inline\n// <style>) so the override wins over the bundled stylesheet\n// regardless of how Vite orders the CSS output.\nconst RADIUS_PRESETS: Record<string, [string, string, string]> = {\n none: ['0rem', '0rem', '0rem'],\n soft: ['0.625rem', '0.5rem', '0.75rem'],\n round: ['0.875rem', '0.75rem', '1rem'],\n};\nconst DENSITY_SPACING: Record<string, string> = {\n compact: '0.225rem',\n comfortable: '0.25rem',\n spacious: '0.28rem',\n};\n\n// Brand fill and text derive from ONE WCAG computation (contrast.ts)\n// so background and foreground can never drift apart across themes.\n\nconst themeConfig = site.theme;\nconst themeStyleParts: string[] = [];\nif (themeConfig) {\n const radius = RADIUS_PRESETS[themeConfig.radius ?? 'soft'];\n if (radius && themeConfig.radius && themeConfig.radius !== 'soft') {\n themeStyleParts.push(\n `--grove-radius: ${radius[0]}`,\n `--grove-radius-lg: ${radius[1]}`,\n `--grove-radius-xl: ${radius[2]}`,\n );\n }\n const spacing = DENSITY_SPACING[themeConfig.density ?? 'comfortable'];\n if (spacing && themeConfig.density && themeConfig.density !== 'comfortable') {\n themeStyleParts.push(`--spacing: ${spacing}`);\n }\n if (themeConfig.containerWidth) {\n themeStyleParts.push(`--grove-container: ${themeConfig.containerWidth}`);\n }\n const primary = themeConfig.primaryColor;\n if (typeof primary === 'string' && /^#[0-9a-fA-F]{3,8}$/.test(primary)) {\n const palette = derivePrimaryPalette(primary);\n if (palette) {\n themeStyleParts.push(\n `--grove-theme-primary: ${palette.solid}`,\n `--grove-theme-primary-foreground: ${palette.solidForeground}`,\n `--grove-theme-primary-dark: ${palette.dark}`,\n `--grove-theme-primary-dark-foreground: ${palette.darkForeground}`,\n );\n }\n }\n}\nconst themeStyle = themeStyleParts.length > 0 ? `${themeStyleParts.join('; ')};` : undefined;\n\n// `site.favicon` points at a file the consumer owns under `public/`.\n// The fallback is a generated square — tinted with the configured\n// brand color rather than a hardcoded near-black, so an unconfigured\n// site still gets a tab mark that is recognisably its own.\nconst faviconFill = (site.theme?.primaryColor ?? '#18181b').trim();\nconst favicon =\n site.favicon ??\n `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect width='16' height='16' rx='3' fill='${encodeURIComponent(faviconFill)}'/%3E%3C/svg%3E`;\n---\n\n<!doctype html>\n<html lang={site.locale ?? 'en'} style={themeStyle}>\n <head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <meta name=\"generator\" content={Astro.generator} />\n <meta name=\"theme-color\" content=\"#0a0a0c\" media=\"(prefers-color-scheme: dark)\" />\n <meta name=\"theme-color\" content=\"#fafafa\" media=\"(prefers-color-scheme: light)\" />\n <link rel=\"icon\" href={favicon} />\n <link rel=\"sitemap\" href=\"/sitemap.xml\" />\n {/* Preconnect to GitHub's avatar CDN — most pages render at least\n one avatar (record list cards, detail page logo) and the\n connection is reusable across cards. Cross-origin only, no\n document fetch, so the cost is one TLS handshake per page. */}\n <link rel=\"preconnect\" href=\"https://avatars.githubusercontent.com\" crossorigin=\"anonymous\" />\n <link\n rel=\"alternate\"\n type=\"text/plain\"\n href=\"/llms.txt\"\n title=\"LLM usage guidance\"\n />\n\n {effectiveGaId && (\n <>\n <script\n is:inline\n async\n src={`https://www.googletagmanager.com/gtag/js?id=${effectiveGaId}`}\n />\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n window.dataLayer = window.dataLayer || [];\n // define:vars wraps this script in a function, so a plain\n // `function gtag` would stay local; the Back/Forward handler at\n // the end of <body> needs it on window.\n window.gtag = function gtag() {\n dataLayer.push(arguments);\n };\n gtag(\"js\", new Date());\n gtag(\"config\", gaId, {\n page_path: window.location.pathname + window.location.search,\n page_title: document.title,\n });\n </script>\n </>\n )}\n\n <Seo\n title={title}\n description={description}\n type={type}\n noindex={noindex}\n robots={robots}\n jsonLd={jsonLd}\n {...(image ? { image } : {})}\n imageAlt={imageAlt}\n site={site}\n searchPath={directoryPath}\n />\n\n <slot name=\"head\" />\n\n <script is:inline>\n // THEME_INIT — runs before paint so the user never sees a\n // flash of the wrong theme. State is persisted in localStorage\n // under the key \"grove-theme\" (matching ThemeToggle.astro).\n (function () {\n var STORAGE_KEY = \"grove-theme\";\n function getMode() {\n try {\n var stored = localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\" || stored === \"system\")\n return stored;\n } catch (e) {\n // localStorage may be blocked (private mode, etc.) —\n // fall through to the system default.\n }\n return \"system\";\n }\n function apply(mode) {\n var resolved =\n mode === \"system\"\n ? (window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\")\n : mode;\n var root = document.documentElement;\n if (resolved === \"dark\") root.classList.add(\"dark\");\n else root.classList.remove(\"dark\");\n root.dataset.theme = mode;\n root.dataset.resolvedTheme = resolved;\n }\n apply(getMode());\n window.addEventListener(\"theme:set\", function (e) {\n apply(e.detail);\n });\n var mq = window.matchMedia(\"(prefers-color-scheme: dark)\");\n mq.addEventListener(\"change\", function () {\n if (getMode() === \"system\") apply(\"system\");\n });\n })();\n </script>\n </head>\n <body class=\"min-h-screen bg-background text-foreground\">\n <a\n href=\"#main\"\n class=\"sr-only z-50 rounded-md bg-background px-3 py-2 text-sm font-medium text-foreground outline-none ring-2 ring-ring focus:not-sr-only focus:fixed focus:left-3 focus:top-3\"\n >\n Skip to content\n </a>\n <slot name=\"header\">\n <Header\n site={site}\n submitLabel={submitLabel ?? (site.blueprintConfig ? `Submit ${site.blueprintConfig.labelSingular ?? \"item\"}` : undefined)}\n submitHref={submitHref ?? (site.blueprintConfig ? \"/submit\" : undefined)}\n />\n </slot>\n\n <main id=\"main\">\n <slot />\n </main>\n\n <slot name=\"footer\">\n <Footer\n site={site}\n stats={{\n totalApps: site.stats?.totalApps,\n totalCategories: site.stats?.totalCategories,\n totalStacks: site.stats?.totalStacks,\n totalOwners: site.stats?.totalOwners,\n }}\n itemsLabel={site.blueprintConfig?.labelPlural ?? \"items\"}\n discover={{\n heading: \"Discover\",\n items: [\n ...(site.stats?.totalApps\n ? [{ label: \"Browse all\", href: directoryPath }]\n : []),\n { label: \"Community\", href: \"/contributors\" },\n ...(site.stats?.originalRepo\n ? [{ label: \"View on GitHub\", href: site.stats.originalRepo, external: true }]\n : []),\n ],\n }}\n contribute={{\n heading: \"Contribute\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Submit via GitHub\",\n href: `${site.repoUrl}/blob/main/CONTRIBUTING.md`,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Report an issue\",\n href: `${site.repoUrl}/issues`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n project={{\n heading: \"Project\",\n items: [\n ...(site.repoUrl\n ? [\n {\n label: \"Source on GitHub\",\n href: site.repoUrl,\n external: true,\n },\n ]\n : []),\n ...(site.repoUrl\n ? [\n {\n label: \"Changelog\",\n href: `${site.repoUrl}/blob/main/CHANGELOG.md`,\n external: true,\n },\n ]\n : []),\n ],\n }}\n />\n </slot>\n\n <slot name=\"body-end\" />\n\n {effectiveGaId && (\n <script is:inline define:vars={{ gaId: effectiveGaId }}>\n (function () {\n // GA4's `gtag('config', id)` call in the <head> already auto-pings\n // `page_view` on full navigations, so this block only needs to\n // catch history changes (back/forward). No history.pushState /\n // replaceState wrap: the package does not install\n // @astrojs/transitions' ClientRouter, and those wraps\n // double-fired page_view events on every navigation.\n var last = location.pathname + location.search;\n function report() {\n var next = location.pathname + location.search;\n if (next === last || typeof window.gtag !== \"function\") return;\n last = next;\n window.gtag(\"event\", \"page_view\", {\n page_path: next,\n page_title: document.title,\n page_location: location.href,\n });\n }\n window.addEventListener(\"popstate\", report);\n })();\n </script>\n )}\n </body>\n</html>\n",
19
19
  "type": "registry:component",
20
20
  "target": "~/src/layouts/base-layout.astro"
21
21
  },
@@ -45,7 +45,7 @@
45
45
  },
46
46
  {
47
47
  "path": "default/layouts/seo.astro",
48
- "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareSourceCode\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n jsonLd,\n} = Astro.props;\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n{noindex ? (\n <meta name=\"robots\" content=\"noindex,nofollow\" />\n) : (\n <meta name=\"robots\" content=\"index,follow,max-image-preview:large\" />\n)}\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareSourceCode, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
48
+ "content": "---\n// SPDX-License-Identifier: MIT\n\n/**\n * Per-page SEO: <title>, description, canonical, Open Graph, Twitter Card,\n * and JSON-LD structured data. Designed to be used inside <head> by the\n * BaseLayout. Pages pass the rich props they care about; everything else\n * has a sensible default derived from the site config and the Astro URL.\n *\n * Renders:\n * - <title>, meta description, canonical link, robots\n * - Open Graph (og:*) for Facebook, LinkedIn, Discord, Slack, etc.\n * - Twitter Card (twitter:*) for X / Twitter\n * - JSON-LD WebSite+Organization identity graph on every page\n * (built by @grove-dev/core's `siteSchema`, with a SearchAction\n * pointing at the directory's browse page)\n * - Per-page JSON-LD nodes when `jsonLd` is provided (SoftwareApplication\n * on record pages, CollectionPage/ItemList/BreadcrumbList on\n * collection and taxonomy pages, ...)\n *\n * Noindex is opt-in via the `noindex` prop. By default everything is\n * indexable; noindex targets today are /submit, /404, and /empty.\n * `robots` sets the exact value instead — page models pass\n * `noindex,follow` for pages the index policy (`seo.*IndexPolicy`)\n * excludes, so their links are still followed.\n *\n * Any URL with a query string (`?q=`, `?sort=`, facet filters) is a\n * filtered view of a static page: the server sends the base page's\n * HTML, canonical included. A small inline script switches the robots\n * meta to `noindex,follow` on those URLs so the variant itself is not\n * indexed; Google renders JavaScript and honours a robots meta the page\n * sets at runtime. A server-side `X-Robots-Tag` is stronger where the\n * host allows it (see the SEO docs).\n */\nimport { type JsonLdNode, siteSchema, validateJsonLd } from '@grove-dev/core';\n\ninterface Props {\n title: string;\n description: string;\n site: {\n name: string;\n description?: string;\n repoUrl?: string;\n /** Header logo path under `public/` — used as Organization logo when set. */\n logo?: string;\n /** BCP-47 language tag (e.g. \"en\"). Drives og:locale + JSON-LD inLanguage. */\n locale?: string;\n /** Twitter/X handle (e.g. \"@grove\") — emitted as twitter:site. */\n twitter?: string;\n };\n searchPath?: string;\n /** Open Graph / Twitter image. Default: /og-image.svg. Should be absolute or root-relative. */\n image?: string;\n /** Alt text for the OG/Twitter image. Default: \"<site name> social preview\". */\n imageAlt?: string;\n /** og:type. Default: \"website\". Use \"article\" for blog posts / changelog. */\n type?: 'website' | 'article' | 'profile';\n /** Set true to add noindex,nofollow. */\n noindex?: boolean;\n /** Exact robots meta value (e.g. \"noindex,follow\"); wins over `noindex`. */\n robots?: string;\n /** Extra JSON-LD payload (object) — typically SoftwareSourceCode on item pages. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\nconst {\n title,\n description,\n site: siteConfig,\n searchPath = '/items',\n image = '/og-image.svg',\n imageAlt,\n type = 'website',\n noindex = false,\n robots,\n jsonLd,\n} = Astro.props;\nconst robotsContent =\n robots ?? (noindex ? 'noindex,nofollow' : 'index,follow,max-image-preview:large');\n\n// `Astro.site` is required for canonical / OG / Twitter / JSON-LD URLs to\n// resolve to the consumer's domain. Failing the build (rather than silently\n// emitting `https://example.com/...`) is the right call: every canonical,\n// OG, and JSON-LD URL would otherwise leak to a domain the consumer doesn't\n// own, which search engines either ignore or treat as canonical to the\n// wrong host.\nif (!Astro.site) {\n throw new Error(\n \"Seo: `site` is not set on the Astro config. Add `site: 'https://your-domain'` to astro.config.mjs so canonical / Open Graph / Twitter / JSON-LD URLs resolve correctly.\",\n );\n}\nconst siteUrl = Astro.site;\nconst canonical = new URL(Astro.url.pathname, siteUrl).toString();\nconst ogImage = new URL(image, siteUrl).toString();\nconst ogImageAlt = imageAlt ?? `${siteConfig.name} social preview`;\nconst locale = siteConfig.locale ?? 'en';\n\n// Truncate description for OG/Twitter where longer is worse (160–200 chars).\nfunction truncate(s: string, max: number): string {\n if (s.length <= max) return s;\n return s.slice(0, max - 1).trimEnd() + '…';\n}\nconst shortDescription = truncate(description, 200);\n\n// WebSite+Organization identity graph — site-wide signals that appear on\n// every page (Google uses them for site links and the knowledge panel).\n// Built by core's `siteSchema` so the @id graph shape is shared with the\n// rest of the JSON-LD registry; the SearchAction is appended here because\n// the browse path is an adapter concern, not a core one.\nconst bareSiteUrl = siteUrl.toString().replace(/\\/$/, '');\nconst [siteLd] = siteSchema({\n url: bareSiteUrl,\n name: siteConfig.name,\n description: siteConfig.description ?? description,\n inLanguage: locale,\n orgName: siteConfig.name,\n orgUrl: bareSiteUrl,\n ...(siteConfig.logo ? { orgLogo: new URL(siteConfig.logo, siteUrl).toString() } : {}),\n ...(siteConfig.repoUrl ? { sameAs: [siteConfig.repoUrl] } : {}),\n});\nsiteLd.potentialAction = {\n '@type': 'SearchAction',\n target: `${bareSiteUrl}${searchPath}?q={search_term_string}`,\n 'query-input': 'required name=search_term_string',\n};\n\nconst perPageNodes = jsonLd ? (Array.isArray(jsonLd) ? jsonLd : [jsonLd]) : null;\n\n// Dev-only well-formedness check — surfaces malformed nodes (relative\n// URLs, missing @context, duplicate @ids) in the terminal during\n// `astro dev` without ever failing or slowing a production build.\nif (import.meta.env.DEV && perPageNodes) {\n const issues = validateJsonLd(perPageNodes as JsonLdNode[]);\n for (const issue of issues) {\n console.warn(`[grove seo] ${Astro.url.pathname}: ${issue.message}`);\n }\n}\n\n// Pre-stringify the JSON-LD payloads in the frontmatter so the\n// template body just interpolates the resulting strings. For SSR\n// this saves the JSON.stringify call on every render; for static\n// builds the cost is unchanged but the template reads cleaner.\nconst siteLdJson = JSON.stringify(siteLd);\nconst perPageLdJson = perPageNodes ? JSON.stringify(perPageNodes) : null;\n---\n\n<!-- Primary meta -->\n<title>{title}</title>\n<meta name=\"description\" content={description} />\n<link rel=\"canonical\" href={canonical} />\n<meta name=\"robots\" content={robotsContent} />\n<!-- Filtered / parameter URLs: noindex the variant, canonical stays the base page. -->\n<script is:inline data-grove-param-robots>\n if (location.search) {\n document.querySelector('meta[name=\"robots\"]')?.setAttribute('content', 'noindex,follow');\n }\n</script>\n\n<!-- Open Graph -->\n<meta property=\"og:type\" content={type} />\n<meta property=\"og:url\" content={canonical} />\n<meta property=\"og:title\" content={title} />\n<meta property=\"og:description\" content={shortDescription} />\n<meta property=\"og:image\" content={ogImage} />\n<meta property=\"og:image:width\" content=\"1200\" />\n<meta property=\"og:image:height\" content=\"630\" />\n<meta property=\"og:image:alt\" content={ogImageAlt} />\n<meta property=\"og:site_name\" content={siteConfig.name} />\n<meta property=\"og:locale\" content={locale} />\n\n<!-- Twitter Card -->\n<meta name=\"twitter:card\" content=\"summary_large_image\" />\n{siteConfig.twitter && <meta name=\"twitter:site\" content={siteConfig.twitter} />}\n<meta name=\"twitter:title\" content={title} />\n<meta name=\"twitter:description\" content={shortDescription} />\n<meta name=\"twitter:image\" content={ogImage} />\n<meta name=\"twitter:image:alt\" content={ogImageAlt} />\n\n<!-- JSON-LD: site-wide identity graph -->\n<script is:inline type=\"application/ld+json\" set:html={siteLdJson} />\n\n<!-- JSON-LD: per-page (SoftwareApplication, CollectionPage, BreadcrumbList, ...) -->\n{perPageLdJson && (\n <script\n is:inline\n type=\"application/ld+json\"\n set:html={perPageLdJson}\n />\n)}\n",
49
49
  "type": "registry:component",
50
50
  "target": "~/src/layouts/seo.astro"
51
51
  },
@@ -70,7 +70,7 @@
70
70
  ],
71
71
  "meta": {
72
72
  "version": "1.3.0",
73
- "requiresGrove": "0.17.0"
73
+ "requiresGrove": "0.18.0"
74
74
  },
75
75
  "type": "registry:block"
76
76
  }
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "meta": {
25
25
  "version": "1.3.0",
26
- "requiresGrove": "0.17.0"
26
+ "requiresGrove": "0.18.0"
27
27
  },
28
28
  "type": "registry:block"
29
29
  }
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  "path": "default/pages/categories/[name].astro",
21
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const categories = siteConfig.taxonomy?.categories ?? [];\n // A category no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return categories\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('categories', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
21
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const categories = siteConfig.taxonomy?.categories ?? [];\n // A category no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return categories\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('categories', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Category\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory in the ${displayName} category.`}\n scope={{ categories: [name] }}\n count={model.records.length}\n pathPrefix={`/categories/${name}`}\n />\n</BaseLayout>\n",
22
22
  "type": "registry:page",
23
23
  "target": "~/src/pages/categories/[name].astro"
24
24
  },
@@ -30,7 +30,7 @@
30
30
  },
31
31
  {
32
32
  "path": "default/pages/stacks/[name].astro",
33
- "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const stacks = siteConfig.taxonomy?.stacks ?? [];\n // A stack no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return stacks\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('stacks', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
33
+ "content": "---\nimport siteConfig from '@grove/generated/site-config.json';\nimport { getTaxonomyPageModel, itemLabelPlural } from '@grove-dev/astro/server';\nimport TaxonomyList from '../../components/grove/taxonomy-list.astro';\nimport BaseLayout from '../../layouts/base-layout.astro';\n\nexport function getStaticPaths() {\n const stacks = siteConfig.taxonomy?.stacks ?? [];\n // A stack no record currently uses gets no page at all — the\n // static host 404s the request instead of publishing a thin,\n // indexable \"0 apps\" page for it.\n return stacks\n .filter(({ count }) => (count ?? 0) > 0)\n .map(({ id, name }) => ({\n params: { name: id },\n props: { displayName: name },\n }));\n}\n\nconst { displayName } = Astro.props;\nconst name = Astro.params.name;\nconst model = getTaxonomyPageModel('stacks', name, displayName, siteConfig);\n---\n\n<BaseLayout\n title={model.seo.title}\n description={model.seo.description}\n image={model.seo.image}\n imageAlt={model.seo.imageAlt}\n jsonLd={model.seo.jsonLd}\n noindex={model.seo.noindex}\n robots={model.seo.robots}\n site={siteConfig}\n>\n <TaxonomyList\n eyebrow=\"Stack\"\n displayName={displayName}\n lede={`Browse ${itemLabelPlural()} in this directory built with ${displayName}.`}\n scope={{ stacks: [name] }}\n count={model.records.length}\n pathPrefix={`/stacks/${name}`}\n />\n</BaseLayout>\n",
34
34
  "type": "registry:page",
35
35
  "target": "~/src/pages/stacks/[name].astro"
36
36
  },
@@ -61,7 +61,7 @@
61
61
  ],
62
62
  "meta": {
63
63
  "version": "1.3.0",
64
- "requiresGrove": "0.17.0"
64
+ "requiresGrove": "0.18.0"
65
65
  },
66
66
  "type": "registry:block"
67
67
  }
package/dist/r/ui.json CHANGED
@@ -49,7 +49,7 @@
49
49
  ],
50
50
  "meta": {
51
51
  "version": "1.3.0",
52
- "requiresGrove": "0.17.0"
52
+ "requiresGrove": "0.18.0"
53
53
  },
54
54
  "type": "registry:ui"
55
55
  }
@@ -1,4 +1,4 @@
1
- import { enrichFromGithubHtml, fetchGithubMetadata, type GroveConfig } from '@grove-dev/core';
1
+ import { type CandidateCollector, enrichFromGithubHtml, fetchGithubMetadata, type GroveConfig } from '@grove-dev/core';
2
2
  import { type SyncOutcome } from './sync-summary.js';
3
3
  export interface GithubSyncOptions {
4
4
  cwd: string;
@@ -7,6 +7,10 @@ export interface GithubSyncOptions {
7
7
  /** Injected for tests; default to the real GitHub fetchers. */
8
8
  fetchMetadata?: typeof fetchGithubMetadata;
9
9
  fetchHtml?: typeof enrichFromGithubHtml;
10
+ /** Injected for tests; defaults to a real collector when `integrations.github.candidates` is on. */
11
+ candidateCollector?: CandidateCollector;
12
+ /** Sent to Repology and the other package indexes. */
13
+ userAgent?: string;
10
14
  now?: () => Date;
11
15
  log?: (line: string) => void;
12
16
  }
@@ -15,6 +19,22 @@ export interface GithubSyncRun {
15
19
  /** Records that still carry an inline `github` / `health` block. */
16
20
  inlineRecords: string[];
17
21
  cacheDir: string;
22
+ /** Present when `integrations.github.candidates` is on. */
23
+ candidates?: CandidateRunSummary;
24
+ }
25
+ export interface CandidateRunSummary {
26
+ /** Records candidates were collected for. */
27
+ records: number;
28
+ /** Records with at least one candidate of each kind. */
29
+ withChannels: number;
30
+ withLogos: number;
31
+ withScreenshots: number;
32
+ /** Candidate lookups that failed, one line per record. */
33
+ failures: Array<{
34
+ slug: string;
35
+ reason: string;
36
+ }>;
37
+ requests: number;
18
38
  }
19
39
  /**
20
40
  * `grove sync github`: fetch each record's repository and write the
@@ -27,4 +47,9 @@ export interface GithubSyncRun {
27
47
  * with the failure recorded next to it.
28
48
  */
29
49
  export declare function runGithubSync(options: GithubSyncOptions): Promise<GithubSyncRun>;
50
+ /**
51
+ * End-of-run candidate report: how many records got each kind, and
52
+ * which lookups failed (at most ten lines; the cache has the rest).
53
+ */
54
+ export declare function formatCandidateRunSummary(summary: CandidateRunSummary): string;
30
55
  //# sourceMappingURL=sync-github.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync-github.d.ts","sourceRoot":"","sources":["../src/sync-github.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,oBAAoB,EACpB,mBAAmB,EAEnB,KAAK,WAAW,EASjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,aAAa,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,oBAAoB,CAAC;IACxC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,oEAAoE;IACpE,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC,CA6GtF"}
1
+ {"version":3,"file":"sync-github.d.ts","sourceRoot":"","sources":["../src/sync-github.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,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F;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAW9E"}
@@ -1,5 +1,5 @@
1
1
  import { basename } from 'node:path';
2
- import { buildGithubSyncPatch, classifyHealth, enrichFromGithubHtml, fetchGithubMetadata, loadGithubCache, nextGithubCacheEntry, normalizeGithubIntegration, parseGithubRepoUrl, pruneLegacyGithubFields, readRecordSources, seedGithubCacheEntry, writeGithubCacheEntry, } from '@grove-dev/core';
2
+ import { buildGithubSyncPatch, classifyHealth, createCandidateCollector, enrichFromGithubHtml, fetchGithubMetadata, loadGithubCache, nextGithubCacheEntry, normalizeGithubIntegration, parseGithubRepoUrl, pruneLegacyGithubFields, readRecordSources, seedGithubCacheEntry, writeGithubCacheEntry, } from '@grove-dev/core';
3
3
  import { shortReason } from './sync-summary.js';
4
4
  /**
5
5
  * `grove sync github`: fetch each record's repository and write the
@@ -24,6 +24,21 @@ export async function runGithubSync(options) {
24
24
  const { sources } = await readRecordSources(config, cwd);
25
25
  const selected = options.limit === undefined ? sources : sources.slice(0, options.limit);
26
26
  const cache = await loadGithubCache(config, cwd);
27
+ const collector = githubFlags.candidates
28
+ ? (options.candidateCollector ??
29
+ createCandidateCollector({
30
+ ...(options.userAgent ? { userAgent: options.userAgent } : {}),
31
+ now,
32
+ }))
33
+ : undefined;
34
+ const candidateSummary = {
35
+ records: 0,
36
+ withChannels: 0,
37
+ withLogos: 0,
38
+ withScreenshots: 0,
39
+ failures: [],
40
+ requests: 0,
41
+ };
27
42
  const outcomes = [];
28
43
  const inlineRecords = [];
29
44
  for (const record of selected) {
@@ -101,6 +116,30 @@ export async function runGithubSync(options) {
101
116
  failures.push({ source: 'html', reason: shortReason(error) });
102
117
  }
103
118
  }
119
+ // Candidates: only for a repository that exists. Their failures
120
+ // are recorded on the entry but never change the record's outcome.
121
+ let candidates;
122
+ const candidateFailures = [];
123
+ if (collector && source) {
124
+ const collected = await collector.collect({
125
+ owner: ref.owner,
126
+ repo: ref.repo,
127
+ ...(previous.candidates ? { previous: previous.candidates } : {}),
128
+ });
129
+ candidates = collected.candidates;
130
+ candidateFailures.push(...collected.failures);
131
+ candidateSummary.records += 1;
132
+ candidateSummary.requests += collected.requests;
133
+ if (candidates.channels.length > 0)
134
+ candidateSummary.withChannels += 1;
135
+ if (candidates.logos.length > 0)
136
+ candidateSummary.withLogos += 1;
137
+ if (candidates.screenshots.length > 0)
138
+ candidateSummary.withScreenshots += 1;
139
+ if (collected.failures.length > 0) {
140
+ candidateSummary.failures.push({ slug, reason: collected.failures.join('; ') });
141
+ }
142
+ }
104
143
  const at = now().toISOString();
105
144
  if (source)
106
145
  patch.sync = { syncedAt: at, source };
@@ -111,7 +150,13 @@ export async function runGithubSync(options) {
111
150
  ...(source ? { source, github: { ...pruneLegacyGithubFields(github), ...patch } } : {}),
112
151
  ...(health ? { health } : {}),
113
152
  ...(sourceDescription ? { sourceDescription } : {}),
114
- failures,
153
+ ...(candidates ? { candidates } : {}),
154
+ failures: [
155
+ ...failures,
156
+ ...(candidateFailures.length > 0
157
+ ? [{ source: 'candidates', reason: shortReason(candidateFailures.join('; ')) }]
158
+ : []),
159
+ ],
115
160
  });
116
161
  await writeGithubCacheEntry(cache.dir, entry);
117
162
  const reason = failures.length > 0
@@ -120,8 +165,34 @@ export async function runGithubSync(options) {
120
165
  .join('; ')
121
166
  : undefined;
122
167
  outcomes.push({ slug, outcome: source ?? 'failed', ...(reason ? { reason } : {}) });
123
- log(`[sync github] ${file}: ${source ?? 'unavailable'}`);
168
+ const found = candidates
169
+ ? ` · candidates: ${candidates.channels.length} channel(s), ${candidates.logos.length} logo(s), ${candidates.screenshots.length} screenshot(s)`
170
+ : '';
171
+ log(`[sync github] ${file}: ${source ?? 'unavailable'}${found}`);
172
+ }
173
+ return {
174
+ outcomes,
175
+ inlineRecords,
176
+ cacheDir: cache.dir,
177
+ ...(collector ? { candidates: candidateSummary } : {}),
178
+ };
179
+ }
180
+ /**
181
+ * End-of-run candidate report: how many records got each kind, and
182
+ * which lookups failed (at most ten lines; the cache has the rest).
183
+ */
184
+ export function formatCandidateRunSummary(summary) {
185
+ const lines = [
186
+ `[sync github] candidates for ${summary.records} record(s): ${summary.withChannels} with channels, ${summary.withLogos} with logos, ${summary.withScreenshots} with screenshots (${summary.requests} requests). Review with \`grove candidates\`.`,
187
+ ];
188
+ if (summary.failures.length > 0) {
189
+ lines.push(`[sync github] candidate lookups failed for ${summary.failures.length} record(s):`);
190
+ const sorted = [...summary.failures].sort((a, b) => a.slug.localeCompare(b.slug));
191
+ for (const { slug, reason } of sorted.slice(0, 10))
192
+ lines.push(` - ${slug}: ${reason}`);
193
+ if (sorted.length > 10)
194
+ lines.push(` … and ${sorted.length - 10} more`);
124
195
  }
125
- return { outcomes, inlineRecords, cacheDir: cache.dir };
196
+ return lines.join('\n');
126
197
  }
127
198
  //# sourceMappingURL=sync-github.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sync-github.js","sourceRoot":"","sources":["../src/sync-github.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EAGnB,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,kBAAkB,EAClB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAoB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBlE;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,OAA0B;IAC5D,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;IAChC,MAAM,aAAa,GAAG,OAAO,CAAC,aAAa,IAAI,mBAAmB,CAAC;IACnE,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,oBAAoB,CAAC;IAC5D,MAAM,GAAG,GAAG,OAAO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,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAClF,KAAK,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,KAAK,MAAM,EAAE,CAAC,CAAC;QACzF,IAAI,MAAM,CAAC,MAAM,GAAG,EAAE;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,MAAM,GAAG,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grove-dev/cli",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "description": "Grove CLI — scaffolds Grove-powered spaces and orchestrates @grove-dev/core commands.",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "lighthouse": "^12.8.2",
49
49
  "typescript": "^5.9.3",
50
50
  "yaml": "^2.6.0",
51
- "@grove-dev/core": "0.17.0"
51
+ "@grove-dev/core": "0.18.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "tsx": "^4.23.0",