mirror of
https://github.com/prdlk/website.git
synced 2026-08-03 01:41:53 +00:00
docs(content): add documentation for content directory structure and collections
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<!-- Parent: ../AGENTS.md -->
|
||||
<!-- Generated: 2026-06-30 | Updated: 2026-06-30 -->
|
||||
|
||||
# content
|
||||
|
||||
## Purpose
|
||||
Markdown/MDX content for the four collections. Each subdirectory is a collection; the filename is the entry id/slug. Schemas live in `src/content.config.ts`.
|
||||
|
||||
## Subdirectories
|
||||
| Directory | Collection key | Route | Notes |
|
||||
|-----------|----------------|-------|-------|
|
||||
| `projects/` | `projects` | `/projects` | Things built. Fields: `title`, `startDate`, `endDate?` (omit = ongoing), `description?`, `link?`, `repo?`, `tags?` (skills; browsable at `/projects/tags/<tag>`), `experiences?`. Sorted by `endDate` desc, ongoing first. |
|
||||
| `writing/` | `writing` | `/writing` | Posts. Fields incl. `description`, `coverImage?`, `ogImage?`, `tags?`, `experiences?`, `draft`, `pinned`. |
|
||||
| `experience/` | `experience` | `/experience` | Resume entries + taxonomy. Fields: `title`, `organization`, `startDate`, `endDate?`, `role?`, `location?`, `url?`, `description?`. |
|
||||
| `speaking/` | `speaking` | `/speaking` | Talks. Fields: `title`, `description`, `publishDate`, `videoId` (Cloudflare Stream UID), `originalSource?`, `event?`, `tags?`, `experiences?`, `draft`. |
|
||||
|
||||
## For AI Agents
|
||||
|
||||
### Working In This Directory
|
||||
- **Experience taxonomy:** entries in `projects`, `writing`, and `speaking` reference experiences via an `experiences: [<id>]` array (validated by `reference("experience")`). The id is the experience filename without extension (e.g. `experiences: ["sonr"]` → `experience/sonr.md`). Adding a ref to a non-existent experience fails the build.
|
||||
- `draft: true` (writing/speaking) hides an entry from production builds.
|
||||
- After editing frontmatter, `pnpm build` validates it against the schema.
|
||||
|
||||
### Common Patterns
|
||||
- Some `writing/` samples (`markdown-elements`, `testing/`) are leftover theme demos showcasing markdown rendering — safe to delete once real content exists.
|
||||
|
||||
<!-- MANUAL: -->
|
||||
Reference in New Issue
Block a user