Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.07 KB

front-matter.md

File metadata and controls

51 lines (36 loc) · 1.07 KB

Front matter

Front matter in staticsite1 is arbitrary key/value data stored in JSON, YAML, or toml format.

It is the way used to add metadata in markdown, data, and jinja2 pages.

If metadata starts with ---, it is read as YAML. If it starts with +++ it is read as TOML. If it starts with {, it is read as JSON.

For documentation on possible metadata contents, see Common page metadata

Example YAML front matter in a markdown page

---
title: Page with metadata in YAML format
---
page contents

Example JSON front matter in a Jinja2 page

{% block front_matter %}
{
    "title": "Page with metadata in JSON format"
}
{% endblock %}

{% block content %}
...
{% endblock %}

Example TOML data page

+++
title = "Page with metadata in TOML format"

Inspired from Hugo front matter

Back to reference index

Footnotes