Frontmatter guide

OKF YAML frontmatter

YAML frontmatter is the metadata block that lets an OKF Markdown file describe what concept it contains before the body is read.

What YAML frontmatter does in OKF

Frontmatter gives readers, reviewers, and tools a small structured summary before they load the Markdown body. In OKF files, this metadata helps identify the concept type, readable title, summary, source resource, tags, and freshness signal.

Required fields

Optional fields

Copy-ready frontmatter example

OKF YAML frontmatter example
---
type: Documentation Topic
title: API rate limits
description: Explains public API rate limit rules and retry behavior.
resource: https://openknowledgeformat.online/sample/api-rate-limits/
tags: [api, okf, limits]
timestamp: 2026-06-21T00:00:00Z
---

Bad example vs fixed example

The bad example below has no valid type field, an empty description, and tags that are not an inline array.

Bad OKF frontmatter example
---
title API rate limits
description:
tags: api, okf
---

# API rate limits

This file has broken frontmatter and missing type.

Fixed frontmatter example

Fixed OKF frontmatter example
---
type: Documentation Topic
title: API rate limits
description: Explains public API rate limit rules and retry behavior.
resource: https://openknowledgeformat.online/sample/api-rate-limits/
tags: [api, okf, limits]
timestamp: 2026-06-21T00:00:00Z
---

# API rate limits

Write the reviewed rate limit explanation here.

Validation checklist

FAQ

Common questions

Is YAML frontmatter the same as the Markdown body?

No. Frontmatter is metadata at the top of the file; the Markdown body contains the explanation and source context.

What OKF frontmatter field should I add first?

Add type first, then fill title, description, resource, and tags for clearer previews and validation.

Can tags be a comma-separated string?

This site's validator expects an inline array such as [okf, api, limits].

Where should I see a complete file?

Use the OKF file example guide for a full Markdown file.

Related pages

OKF Validator

Check whether frontmatter parses correctly.

Open page

OKF Templates

Copy full starter files with frontmatter and body sections.

Open page

OKF file example

See a complete Markdown file.

Open page

What is OKF?

Review the definition before building files.

Open page

Check your frontmatter

Paste one Markdown file and fix the metadata before adding the file to a bundle.

Open OKF Validator