Urgent.News

What's breaking now, across thousands of outlets.

Tech

"Nobody designed the frontmatter"

I open any file in these repos in VS Code, and before the first heading the Outline panel shows a block of names: title , numero , date , sesion_fuente , fecha_creacion , description , tags , destacado , slug . This post carries those nine at the top, and will gain a tenth once it's published. Yesterday I asked myself who decided each one. Short answer: nobody, all at once. That block is the…

The frontmatter is a block of key-value lines at the top of a Markdown file, containing information such as title, date, tags, and origin. It isn't part of the text itself, but rather metadata that a script can read to understand the file without comprehending the prose.

Each file type comes with a pre-built template containing the frontmatter block, with empty values waiting to be filled in by whoever creates the file. Some fields are updated later by a script, such as when a session closes or a note is published. This allows the site to organize notes, fill in dates, and cross-reference sessions against published notes.

The frontmatter has evolved through four distinct "cradles" or origins, each with its own set of fields born at different times and places. The sessions field, for example, was first introduced in August 16 of another project, while a classification system of domain and type emerged six days later. The note-specific fields were born between September 3 and 15, while the English version was added on the 11th.

Not all fields travel at the same speed or in the same manner. The initial scaffold copies everything, while synchronization only updates certain fields, and a hook fills in a few when each session closes. As a result, not all fields are present in all files. For instance, only 48 out of 215 notes in one project have the classification field, while 178 out of 178 notes in another project include it.

Another notable gap exists in the registration of new sessions. The same hook that fills in an identifier with a regular expression often swallows the start-date line, leaving 254 out of 260 sessions in one project without this important field. This issue went unnoticed until another script had to infer the missing data from the file name.

The four fields that identify a note—slug, numero, fecha_creacion, and tags—have a crucial reader that fails loudly if any of them are missing. This ensures the build breaks and prevents any drift in sync. However, the publication status of a piece isn't stored, but rather recalculated every time it's queried, making it less convenient and impossible to drift out of sync.

Ultimately, the frontmatter block has taken shape through its own history, not by the intent of a single designer. It remains relevant because someone, somewhere, still reads it.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Cinder is now Tomoshibi 灯火 — same scraper, better name

Cinder is now Tomoshibi (灯火, lamp light). Same Go scraper, same API. New name, cleaner monorepo, easier to find. If you used Cinder, your old GitHub URL still redirects and your stars carried over.

  • Cinder rebranded as Tomoshibi (灯火), Japanese for lamp light
  • No breaking API changes, users can access via old GitHub URL
  • Renamed to clearly represent tool's purpose and ease search

More from Wednesday 16 September →