-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontent.config.ts
More file actions
521 lines (484 loc) · 22.1 KB
/
Copy pathcontent.config.ts
File metadata and controls
521 lines (484 loc) · 22.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
import { defineCollection, z } from 'astro:content';
import { glob } from 'astro/loaders';
// Accept a YAML scalar OR a YAML list for fields the tree writes both ways,
// and normalize to an array so renderers have one shape to handle.
//
// `augmented_with` is the live example: this site's entries write it as a
// string ("Claude Code on Opus 4.7") while the tree-wide frontmatter standard
// writes it as a list. Pinning either shape turns a routine normalization
// sweep into a build failure — the same class of break that requiring `date`
// caused on the changelog collection.
const stringList = z
.union([z.string(), z.array(z.string())])
.transform((v) => (Array.isArray(v) ? v : [v]))
.nullable()
.optional();
const pages = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/pages' }),
schema: z.object({
title: z.string(),
description: z.string().optional(),
eyebrow: z.string().optional(),
heading: z.string().optional(),
lede: z.string().optional(),
last_updated: z.coerce.date().optional(),
}),
});
// Tools — the canonical registry of apps/services that participants reference
// in their stacks. Schema is a strict superset of the Lossless Obsidian
// Tooling/* frontmatter (Jina + OpenGraph fetch pipeline) so files can be
// copy-pasted in unchanged. Slug = filename (lowercase-dasherized) is the URL.
const tools = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/tools' }),
schema: z.object({
site_uuid: z.string().optional(),
site_name: z.string().optional(),
title: z.string().optional(),
zinger: z.string().optional(),
url: z.string().optional(),
url_aliases: z.array(z.string()).optional(),
tags: z.array(z.string()).optional(),
category: z.string().optional(),
og_screenshot_url: z.string().optional(),
og_favicon: z.string().optional(),
og_image: z.string().optional(),
logo_light: z.string().optional(),
logo_dark: z.string().optional(),
// Bare-name aliases — the Lossless Obsidian Tooling frontmatter uses
// these instead of the `og_*` forms. Both are accepted so paste-import
// works without renaming; renderers fall back from og_* → bare name.
image: z.string().optional(),
favicon: z.string().optional(),
aliases: z.array(z.string()).optional(),
hero_image_url: z.string().optional(),
description_site_cp: z.string().optional(),
description: z.string().optional(),
og_title: z.string().optional(),
og_url: z.string().optional(),
jina_last_request: z.coerce.date().optional(),
jina_error: z.string().optional(),
og_last_fetch: z.coerce.date().optional(),
date_modified: z.coerce.date().optional(),
date_created: z.coerce.date().optional(),
oss: z.boolean().optional(),
pricing: z.string().optional(),
publish: z.boolean().optional(),
product_of: z.string().optional(),
docs_url: z.string().optional(),
github_profile_url: z.string().optional(),
github_repo_url: z.string().optional(),
youtube_channel_url: z.string().optional(),
}).passthrough(),
});
// Participants — Dojo community members. Slim schema for the v0.1 vertical
// slice; the OAuth handshake doesn't depend on any of these fields, but the
// `/stack/people/[handle]` and `/stack/people` index pages do.
const participants = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/participants' }),
schema: z.object({
handle: z.string(),
name: z.string(),
firm: z.string().optional(),
role: z.string().optional(),
kauffman_class: z.number().nullable().optional(),
github: z.string().optional(),
github_avatar: z.string().optional(),
// Local headshot path — takes priority over github_avatar when set.
// Lives under /public/images/participant-headshots/.
headshot: z.string().optional(),
linkedin: z.string().optional(),
// Directory profile URLs follow the `directory_profile_{slug}` convention
// so we can add new directories (e.g., directory_profile_endeavor,
// directory_profile_techstars) without inventing one-off field names.
directory_profile_kauffman: z.string().optional(),
publish: z.boolean().default(false),
joined_dojo: z.coerce.date().optional(),
current_stack: z.array(z.object({
tool: z.string(),
added: z.coerce.date().optional(),
notes: z.string().optional(),
})).optional(),
aspirational_stack: z.array(z.object({
tool: z.string(),
intent: z.string().optional(),
})).optional(),
abandoned_stack: z.array(z.object({
tool: z.string(),
abandoned: z.coerce.date().optional(),
reason: z.string().optional(),
})).optional(),
}),
});
const sessions = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/sessions' }),
schema: z.object({
title: z.string(),
lede: z.string().optional(),
date_scheduled: z.coerce.date(),
date_posted: z.coerce.date().optional(),
durationMinutes: z.number().optional(),
hosts: z.array(z.string()).optional(),
presenters: z.array(z.string()).optional(),
// Richer presenter blocks driving the avatar-card section. When present,
// the page renders these as a card list and suppresses the simple "With"
// text row. Each entry can carry a topic (the demo they're presenting on).
presenterDetails: z.array(z.object({
name: z.string(),
firm: z.string().optional(),
role: z.string().optional(),
headshot: z.string().optional(),
linkedin: z.string().optional(),
topic: z.string().optional(),
})).optional(),
tags: z.array(z.string()).optional(),
// High-level session-type classifiers (e.g., "All-Hands", "Setupathons",
// "Workshop"). Distinct from `tags` (free-form topical) — classifiers are
// a small, intentional vocabulary the site can render as section headers
// or filter facets. Train-Case values, same convention as tags.
classifiers: z.array(z.string()).optional(),
rsvpUrl: z.string().optional(),
recordingUrl: z.string().optional(),
og_image: z.string().optional(),
// Partner co-branding mark (e.g., Kauffman Fellows). When set, the page
// renders a mode-aware logo block at the top of the article.
partnerMark: z.object({
name: z.string(),
light: z.string(),
dark: z.string(),
vibrant: z.string(),
url: z.string().optional(),
}).optional(),
// When true, the session is excluded from /sessions/ listing pages but
// remains accessible at its direct URL. Use for QA / dry-run sessions.
unlisted: z.boolean().optional(),
// When set, the page renders Section__BreakoutsTeaser after the markdown
// body using the data file at src/data/breakouts/<slug>.ts.
breakouts: z.string().optional(),
// status is NOT in frontmatter — derived at render time from date_scheduled.
// See: src/lib/webinar-status.ts
}),
});
const changelog = defineCollection({
// Per-ship notes. Excludes releases/** — those have richer semantics
// (versions, prior-release cross-refs, multi-date lifecycle) and live in
// their own `releases` collection below.
loader: glob({ pattern: ['**/*.md', '!releases/**'], base: './changelog' }),
schema: z.object({
title: z.string(),
// ── Dates ────────────────────────────────────────────────────────────
// Every spelling is optional + nullable. `date` is the legacy key this
// site was built on; the tree-wide frontmatter standard renames it to the
// editorial pair below. Requiring `date` is what made that rename a
// build-breaking change here, so nothing is required now — renderers
// resolve a date through the fallback chain in src/lib/changelog-date.ts,
// which prefers hand-authored `date` and falls back through the editorial
// keys to the YYYY-MM-DD in the entry id.
//
// Soft validation matches the `releases` collection below and the
// no-hard-validation principle: a missing or typo'd date warns in the UI
// by rendering nothing, it does not fail the build.
date: z.coerce.date().nullable().optional(),
date_authored_initial_draft: z.coerce.date().nullable().optional(),
date_authored_current_draft: z.coerce.date().nullable().optional(),
date_created: z.coerce.date().nullable().optional(),
date_modified: z.coerce.date().nullable().optional(),
date_posted: z.coerce.date().nullable().optional(),
date_scheduled: z.coerce.date().nullable().optional(),
// ── Editorial ────────────────────────────────────────────────────────
// `publish` gates nothing here yet — recorded so the key round-trips.
publish: z.boolean().optional(),
// `lede` is the standard's field; `summary` is this site's original name
// for the same thing. Both accepted, renderers prefer `lede`.
lede: z.string().optional(),
status: z.string().optional(),
// Scalar-or-list tolerant — see `stringList` at the top of this file.
authors: stringList,
augmented_with: stringList,
category: z.string().optional(),
tags: z.array(z.string()).optional(),
summary: z.string().optional(),
files_modified: z.array(z.string()).optional(),
image: z.string().optional(), // populated by scripts/generate-changelog-banners.ts
image_prompt: z.string().optional(), // input to the banner generator
image_text: z.string().optional(), // composited as HTML overlay by BannerWithOverlay
}).passthrough(),
});
// Tagged-release narratives. Shape differs from changelog: identified by
// semantic version (not date), cross-referenced to a prior release + the
// GitHub release URL, with a four-date authoring lifecycle (initial draft →
// current draft → first published → last updated). Bodies are long narratives
// with diff tables and key-feature sections, written once per tagged release.
//
// Soft validation throughout per the no-hard-validation principle — title is
// the only required field. Everything else is optional + .passthrough() so
// authors can add new metadata without schema churn. Date fields use coerce
// + nullable + optional so missing / null / typo'd dates warn but don't break
// the build.
const releases = defineCollection({
loader: glob({ pattern: '**/*.md', base: './changelog/releases' }),
schema: z.object({
title: z.string(),
lede: z.string().optional(),
// Authoring lifecycle — cite-wide convention. All optional + nullable
// so a draft with only an initial-draft date validates the same as a
// published release with all four set.
date_authored_initial_draft: z.coerce.date().nullable().optional(),
date_authored_current_draft: z.coerce.date().nullable().optional(),
date_first_published: z.coerce.date().nullable().optional(),
date_last_updated: z.coerce.date().nullable().optional(),
// Identity / cross-references — strings so a release_tag like "v0.0.8"
// and a semver-shaped "0.0.8" both validate, no .url() on release_url
// (we stripped those earlier per the no-hard-validation sweep).
at_semantic_version: z.string().optional(),
release_tag: z.string().optional(),
release_url: z.string().optional(),
prior_release_tag: z.string().optional(),
// Display + filtering
status: z.string().optional(),
category: z.string().optional(),
tags: z.array(z.string()).optional(),
authors: z.array(z.string()).optional(),
augmented_with: z.string().optional(),
// Display imagery — optional, follows the same shape as changelog/.
image: z.string().optional(),
image_prompt: z.string().optional(),
image_text: z.string().optional(),
}).passthrough(),
});
const ventureWorkflows = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/long-form/venture-workflows' }),
schema: z.object({
chapter_number: z.number(),
title: z.string(),
lede: z.string(),
tags: z.array(z.string()).optional(),
subsection_outline: z.array(z.string()).optional(),
published: z.boolean().default(false),
date_authored: z.coerce.date().optional(),
date_published: z.coerce.date().nullable().optional(),
date_modified: z.coerce.date().nullable().optional(),
source_publication: z.string().optional(),
source_organization: z.string().optional(),
source_chapter_number: z.number().optional(),
source_chapter_title_original: z.string().optional(),
chapter_eyebrow: z.string().optional(),
hero_image: z.string().optional(),
hero_image_prompt: z.string().optional(),
og_image: z.string().optional(),
summary: z.string().optional(),
contributors: z.array(z.string()).optional(),
language: z.string().default('en'),
}).passthrough(),
});
const projects = defineCollection({
loader: glob({ pattern: ['**/*.md', '!**/README.md'], base: './src/content/projects' }),
schema: z.object({
// Identity
title: z.string(),
slug: z.string().optional(),
lede: z.string(),
summary: z.string().optional(),
scope: z.string().optional(),
// Lifecycle
status: z.enum(['active', 'proposed', 'archived']),
date_initiated: z.coerce.date().optional(),
date_archived: z.coerce.date().optional(),
date_last_activity: z.coerce.date().optional(),
// Working group
working_group_name: z.string().optional(),
working_group_leads: z.array(z.object({
uuid: z.string().optional(),
name: z.string(),
role: z.string().optional(),
profile: z.string().optional(),
avatar: z.string().optional(),
})).optional(),
working_group_members: z.array(z.object({
uuid: z.string().optional(),
name: z.string(),
role: z.string().optional(),
profile: z.string().optional(),
avatar: z.string().optional(),
})).optional(),
members_count: z.number().optional(),
cadence: z.string().optional(),
rsvp_url: z.string().optional(),
// Cross-collection back-reference — slug(s) into the working-groups
// collection. Many-to-many: a project can be of interest to multiple WGs.
// Optional; projects without this field are not associated with any WG.
working_group_slugs: z.array(z.string()).optional(),
// External surfaces
links: z.object({
repo: z.string().optional(),
site: z.string().optional(),
demo: z.string().optional(),
figma: z.string().optional(),
spec: z.string().optional(),
notes: z.string().optional(),
videos: z.array(z.string()).optional(),
}).optional(),
// Discovery
tags: z.array(z.string()).optional(),
category: z.string().optional(),
origin: z.string().optional(),
// Display
// - image_prompt: input to scripts/generate-content-banners-on-dir.ts
// (Ideogram → text-stripped 1280×720 PNG); the generator writes the
// resulting public path back to og_image. Edit the prompt to regenerate.
// - og_image: generated banner path; used as the OG/Twitter share image.
// - hero_image: a hand-set per-project banner override (rare; takes
// priority over og_image only when explicitly set).
// - thumbnail: square card thumbnail (gallery uses banner aspect; thumbnail
// reserved for the future popdown thumbnail variant).
image_prompt: z.string().optional(),
og_image: z.string().optional(),
hero_image: z.string().optional(),
thumbnail: z.string().optional(),
icon: z.string().optional(),
banner_overlay: z.enum(['gradient', 'scrim', 'none']).default('gradient'),
card_accent: z.string().optional(),
// Behavior
publish: z.boolean().default(true),
feature_in_popdown: z.boolean().default(true),
popdown_order: z.number().optional(),
// Authorship
authors: z.array(z.string()).optional(),
augmented_with: z.string().optional(),
// Versioning
at_semantic_version: z.string().optional(),
date_created: z.coerce.date().optional(),
date_modified: z.coerce.date().optional(),
}).passthrough(),
});
// Working Groups — long-lived theme/challenge-based communities of practice.
// Schema is cloned from `projects` so we can iterate the surface fast and
// customize fields as the surface matures (per the plan: "fix as we go").
// Fields like `working_group_leads`/`working_group_members` carry naturally
// — on a WG entry they're literally the WG's own roster.
const workingGroups = defineCollection({
loader: glob({ pattern: ['**/*.md', '!**/README.md'], base: './src/content/working-groups' }),
schema: z.object({
// Identity
title: z.string(),
slug: z.string().optional(),
lede: z.string(),
summary: z.string().optional(),
scope: z.string().optional(),
// Lifecycle
status: z.enum(['active', 'proposed', 'archived']),
date_initiated: z.coerce.date().optional(),
date_archived: z.coerce.date().optional(),
date_last_activity: z.coerce.date().optional(),
// Roster
working_group_name: z.string().optional(),
working_group_leads: z.array(z.object({
uuid: z.string().optional(),
name: z.string(),
role: z.string().optional(),
profile: z.string().optional(),
avatar: z.string().optional(),
})).optional(),
working_group_members: z.array(z.object({
uuid: z.string().optional(),
name: z.string(),
role: z.string().optional(),
profile: z.string().optional(),
avatar: z.string().optional(),
})).optional(),
members_count: z.number().optional(),
cadence: z.string().optional(),
rsvp_url: z.string().optional(),
// External surfaces
links: z.object({
repo: z.string().optional(),
site: z.string().optional(),
demo: z.string().optional(),
figma: z.string().optional(),
spec: z.string().optional(),
notes: z.string().optional(),
videos: z.array(z.string()).optional(),
}).optional(),
// Discovery
tags: z.array(z.string()).optional(),
category: z.string().optional(),
origin: z.string().optional(),
// Display
image_prompt: z.string().optional(),
og_image: z.string().optional(),
hero_image: z.string().optional(),
thumbnail: z.string().optional(),
icon: z.string().optional(),
banner_overlay: z.enum(['gradient', 'scrim', 'none']).default('gradient'),
card_accent: z.string().optional(),
// Behavior
publish: z.boolean().default(true),
feature_in_popdown: z.boolean().default(true),
popdown_order: z.number().optional(),
// Authorship
authors: z.array(z.string()).optional(),
augmented_with: z.string().optional(),
// Versioning
at_semantic_version: z.string().optional(),
date_created: z.coerce.date().optional(),
date_modified: z.coerce.date().optional(),
}).passthrough(),
});
// Two-perspective how-to engine (see context-v/specs/Two-Perspective-How-To-Docs-Engine-on-LFM.md).
// Soft schemas — most fields optional + passthrough, never hard-fail on extra frontmatter.
// Structure is intentionally provisional; settling as the first guides get authored.
const useCases = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/use-cases' }),
schema: z.object({
title: z.string(),
lede: z.string().optional(),
perspective: z.string().optional(), // "use-case"
problem: z.string().optional(),
difficulty: z.string().optional(), // beginner | intermediate | advanced
maturity_ladder: z.array(z.string()).optional(),
tools: z.array(z.string()).optional(), // tool registry handles this use-case touches
guides: z.array(z.string()).optional(), // optional manual ordering/featuring; otherwise derived
order: z.number().optional(),
status: z.string().optional(),
publish: z.boolean().optional(),
date_created: z.coerce.date().optional(),
date_modified: z.coerce.date().optional(),
authors: z.array(z.string()).optional(),
augmented_with: z.string().optional(),
tags: z.array(z.string()).optional(),
}).passthrough(),
});
const guides = defineCollection({
loader: glob({ pattern: '**/*.md', base: './src/content/guides' }),
schema: z.object({
title: z.string(),
lede: z.string().optional(),
kind: z.string().optional(), // "how-to"
use_cases: z.array(z.string()).optional(), // relation → use-case slugs
tools: z.array(z.string()).optional(), // relation → tool registry handles
prerequisites: z.array(z.string()).optional(),
estimated_minutes: z.number().optional(),
difficulty: z.string().optional(),
video: z.string().optional(),
order: z.number().optional(),
status: z.string().optional(),
publish: z.boolean().optional(),
date_created: z.coerce.date().optional(),
date_modified: z.coerce.date().optional(),
authors: z.array(z.string()).optional(),
augmented_with: z.string().optional(),
tags: z.array(z.string()).optional(),
}).passthrough(),
});
export const collections = {
pages,
sessions,
changelog,
releases,
ventureWorkflows,
projects,
workingGroups,
tools,
participants,
'use-cases': useCases,
guides,
};