# ADR-076: Article titles and summaries stored apart from the text ## Status Accepted (v2.16.0, 2026-11-11) Supersedes the v2.3.3 design ([micropub-title-and-source-url](../design/v2.3.3/2026-10-31-micropub-title-and-source-url.md)) and Q22's "a note has a title when its content starts with `#`". Amends ADR-014 (feed item titles) and ADR-040 (`p-name` and `p-summary`). ## Context An IndieWeb article is an h-entry with a `name` that isn't just the start of its content (W3C Post Type Discovery). Since v1.2.0, StarPunk marked an article by a `# Heading` first line in the Markdown, and v2.3.3 stored a Micropub `name` as that heading. A review against IndieWeb practice found four gaps: 1. Feeds repeated an article's title: the item title, then the same heading rendered at the top of the content. 2. Every feed item had a title, made from a note's first line (or the date), so feed readers showed notes as headlines and couldn't tell them from articles. 3. Micropub `summary` was used only when `content` was missing; sent together with content, it was dropped. 4. Any note that happened to start with a heading became an article, and its `q=source` changed from what the client sent. Micropub and mf2 treat `name` and `content` as separate properties. ## Decision - **Columns.** `notes.title` and `notes.summary` (migration 023). A note with a title is an article; its Markdown file holds only the body. A heading in the body is just a heading. - **Moving existing titles.** Migration 023 has a Python data step (`migrations.DATA_MIGRATIONS`) that runs once, in the migration's transaction: for each note whose file starts with a heading (`split_title`, trashed files included), it moves the heading into `title`, rewrites the file and updates `content_hash`, then empties `notes_fts` so startup rebuilds it. If anything fails, the changed files are written back and the transaction is rolled back, so 023 is retried on the next start. Tying it to the migration matters: run on every start it would turn new notes' headings into titles. - **Micropub.** `name` → `title`; `summary` → `summary` when `content` is also sent. A summary on its own is still stored as the content, which is how Post Type Discovery reads it. `summary` can be replaced and deleted; `q=source` returns `name` and `summary` when set. If the content starts with a heading equal to `name`, that heading is dropped so it isn't shown twice. - **Feeds.** Only articles have a title: RSS leaves `