Frontmatter
The frontmatter is the YAML block between --- markers at the top of a .td file. It holds the structured data for the resource. This page covers every key and directive you can use.
Structure
---
_type: Person
name: "Alice"
role: "developer"
---The top-level value must be a YAML mapping. Keys are identifiers (alphanumeric and underscores). Values are expressions.
Reserved keys
Keys starting with _ are reserved for built-in directives.
| Key | Required | Description |
|---|---|---|
_type | yes | Schema name this resource conforms to |
_label | no | Human-readable display label (expression) |
_icon | no | Page icon from the icon module (e.g., icon.rocket) |
_extends | no | Parent schema name (schema files only) |
_imports | no | Map of alias to vault-relative file path |
_content | implicit | The markdown body (available as self._content) |
Type declaration: _type
Declares the schema. The value is a PascalCase schema name matching a file in _types/.
_type: PersonFor schema files, the value is schema:
_type: schemaDisplay label: _label
A display label for the resource. Shown in the sidebar, breadcrumbs, and link text. It is an expression that can reference other fields.
_label: "Alice Chen"
_label: "${self.first_name} ${self.last_name}"Page icon: _icon
An icon displayed in the sidebar and page header. Uses the built-in icon module with dot access syntax.
_icon: icon.rocket
_icon: icon.book
_icon: icon.lightbulbSee Icons reference for the full list of available icons.
Schema inheritance: _extends
Schema inheritance. The child schema inherits all properties from the parent.
_type: schema
_extends: Person
properties:
agency:
type: string?Module imports: _imports
Import files from the vault into the current file's scope. Each key is an alias, each value is a vault-relative file path.
_imports:
colors: "_partials/colors.td"
brand: colors.primaryComments
Line comments use #:
name: "Alice" # this is a commentValues
All values are expressions. Strings must be quoted. Unquoted values are identifiers, numbers, or compound expressions.
name: "Alice" # string
count: 42 # number
active: true # boolean
author: fref("people/bob.td") # file reference
full_name: self.first_name + " " + self.last_name # computedExplicit type tags
Optional type tags override inference. Rarely needed since types are inferred from the schema.
name: !string "Alice"
count: !number 42
birth_date: !date "1990-07-04"Available tags: !string, !number, !boolean, !date, !time, !datetime, !type.