How-to guide

How to add YAML frontmatter for OKF

Add YAML frontmatter by placing a metadata block at the top of the Markdown file before the first heading.

Short answer

Add YAML frontmatter by placing a metadata block at the top of the Markdown file before the first heading.

Prerequisites

Step-by-step tutorial

  1. Start the file with ---.
  2. Add type, title, description, resource, tags, and timestamp.
  3. Close the block with ---.
  4. Write the Markdown body.
  5. Validate the file.

Copyable example

How to add YAML frontmatter for OKF example
---
type: Documentation Topic
title: Add YAML frontmatter
description: Explains required and recommended metadata fields.
resource: https://openknowledgeformat.online/guides/how-to-add-yaml-frontmatter-for-okf/
tags: [okf, guide, example]
timestamp: 2026-06-21T00:00:00Z
---

# Purpose

Explain the stable facts, boundaries, owner notes, and related links for this concept.

# Links

- Validator: https://openknowledgeformat.online/okf-validator/
- Examples: https://openknowledgeformat.online/okf-examples/

Common mistakes

Validation method

  1. Paste the file into the OKF Validator.
  2. Fix errors before warnings.
  3. Check links and source claims manually.
  4. Add the file to the bundle index.

FAQ

Common questions

Does this require a database?

No. A folder of Markdown files is enough for the first version.

Can I automate this?

You can generate drafts, but owners should review source accuracy and boundaries.

Related pages

OKF Tutorial

Use the main tutorial for the full workflow.

Open page

OKF Examples

Compare bundle structures.

Open page

OKF Validator

Check the file before publishing.

Open page