Define shared content schema for writings, portfolio, bookshelf, blogs

Adds content/README.md documenting the TOML frontmatter contract each
content type must follow, plus one seed entry per type to lock the
schema in a runnable form. Bookshelf entries use a kind field ("book"
or "paper") so academic papers (DOI/arXiv id) are first-class
alongside ISBN-driven books, not bolted on later.
This commit is contained in:
2026-08-30 17:58:10 +03:00
parent 80e1d55ea1
commit 8be678d488
6 changed files with 167 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
# content/
This directory is the canonical source of truth for all site content. It is
shared between `apps/site` (Astro reads it directly at build time) and
`apps/cms` (Strapi's custom provider reads/writes these same files — its
SQLite database is only a disposable cache/index, never the source of
record). The site must always be buildable straight from this directory with
Strapi entirely absent.
Frontmatter is TOML (`+++ ... +++`), matching the legacy Zola posts under
`content/posts/` to ease migration. Each content type below is one file (or a
directory with `index.md` for entries with co-located assets), one frontmatter
schema.
## `writings/` (blog / essays)
```toml
+++
title = "..."
description = "..."
author = "andwati"
date = 2026-04-08
updated = 2026-04-10 # optional, only when the post has been revised
draft = false
canonical_url = "" # optional, only if first published elsewhere
[taxonomies]
tags = ["..."]
[extra]
series = "..." # optional
series_index = 1 # required if `series` is set
llms_description = "..." # optional per-post override of the site-wide one
+++
```
## `portfolio/` (projects / professional work)
```toml
+++
title = "..."
description = "..."
role = "..."
date_start = 2025-01-01
date_end = 2025-06-01 # optional, omit if ongoing
outcome = "one-line result"
draft = false
[[links]]
label = "Live"
url = "https://..."
[[links]]
label = "Source"
url = "https://..."
[taxonomies]
tags = ["..."] # stack / tech tags
+++
```
Body is a free-form Markdown case study.
## `bookshelf/` (books *and* papers)
`kind` selects which identifier fields apply — books use `isbn`, papers use
`doi`/`arxiv_id`. Cover images are fetched by a lookup (Open Library/Google
Books for ISBNs; Semantic Scholar/arXiv for papers) and cached under
`static/covers/`, never fetched at page-render time.
```toml
+++
title = "..."
kind = "book" # "book" | "paper"
authors = ["..."]
isbn = "9780000000000" # books only
doi = "10.1000/xyz123" # papers only
arxiv_id = "2101.00001" # papers only, optional
url = "https://..." # papers only: landing page / source link
cover_image = "/covers/slug.jpg"
rating = 5 # optional, 1-5
status = "read" # "reading" | "read" | "abandoned"
date_started = 2026-01-01
date_finished = 2026-01-20 # optional, omit if still in progress
[taxonomies]
tags = ["..."] # genre / topic
+++
```
Body is a free-form personal review/notes.
## `blogs/` (curated external blogs)
```toml
+++
title = "..." # the blog/site's name
url = "https://..."
feed_url = "https://.../rss.xml"
+++
```
Body is a one-to-two sentence blurb on why you follow it. No live feed
fetching — this list is hand-curated and static.
+7
View File
@@ -0,0 +1,7 @@
+++
title = "Example Blog"
url = "https://example.com"
feed_url = "https://example.com/rss.xml"
+++
Placeholder blurb establishing the `blogs` content schema.
@@ -0,0 +1,17 @@
+++
title = "Attention Is All You Need"
kind = "paper"
authors = ["Ashish Vaswani", "Noam Shazeer", "Niki Parmar"]
doi = "10.48550/arXiv.1706.03762"
arxiv_id = "1706.03762"
url = "https://arxiv.org/abs/1706.03762"
cover_image = "/covers/attention-is-all-you-need.jpg"
rating = 5
status = "read"
date_started = 2026-02-01
date_finished = 2026-02-03
[taxonomies]
tags = ["machine-learning", "papers"]
+++
Placeholder review establishing the `bookshelf` schema for `kind = "paper"`.
@@ -0,0 +1,15 @@
+++
title = "Structure and Interpretation of Computer Programs"
kind = "book"
authors = ["Harold Abelson", "Gerald Jay Sussman"]
isbn = "9780262510875"
cover_image = "/covers/structure-and-interpretation-of-computer-programs.jpg"
rating = 5
status = "read"
date_started = 2026-01-01
date_finished = 2026-01-20
[taxonomies]
tags = ["computer-science", "programming"]
+++
Placeholder review establishing the `bookshelf` schema for `kind = "book"`.
+15
View File
@@ -0,0 +1,15 @@
+++
title = "Example Project"
description = "Placeholder portfolio entry establishing the schema."
role = "Author"
date_start = 2026-01-01
outcome = "Established the portfolio content schema."
draft = true
[[links]]
label = "Source"
url = "https://github.com/andwati"
[taxonomies]
tags = ["placeholder"]
+++
Placeholder case study body establishing the `portfolio` content schema.
@@ -0,0 +1,15 @@
+++
title = "Why This Site Exists"
description = "A short note on what this new site is, and why it's more than a tech blog."
author = "andwati"
date = 2026-08-30
draft = true
[taxonomies]
tags = ["meta"]
[extra]
llms_description = "An introductory post explaining the purpose of this personal digital-legacy site."
+++
This is a placeholder post establishing the `writings` content schema. It will
be replaced once the design system and migration from the old Zola posts are
ready.