Skip to content

okf/frontmatter

errorOKF specification

Frontmatter blocks parse as YAML, and under OKF 0.2 every concept starts with one (OKF §4, §11).

Every concept is a markdown file that starts with YAML frontmatter between two --- lines, followed by its markdown body (§4). Frontmatter must parse as YAML wherever it’s written (§11): it’s where the concept’s type, title, and trust signals live. Under OKF 0.2, every file other than index.md and log.md is a concept, so one without frontmatter is an error, unless it’s left out with ignore: in .okforest/settings.yaml, as a README is. Under OKF 0.3, a file without frontmatter isn’t a concept, and okf/not-a-concept says so instead.

This file breaks the rule:

churn.md
# Monthly churn
Churn is the customers who cancel in a month, divided by the customers at its start.

okforest validate reports:

churn.md
1:1 error No frontmatter: a concept must start with a `---` YAML block declaring at least `type`. If this is not a concept, add it to `ignore:` in .okforest/settings.yaml. okf/frontmatter

Fixed:

churn.md
---
type: Metric
title: Monthly churn
description: The share of customers who cancel in a month.
---
Churn is the customers who cancel in a month, divided by the customers at its start.