---
id: 20211123213357
title: Print metadata in card's header
tags: [template, zettel, markdown, tag]
---

# Print metadata in card's header

Markdown documents must contain [yaml frontmatter](https://www.mkdocs.org/user-guide/writing-your-docs/#yaml-style-meta-data) to be treated as zettels. The following metadata will be read from the frontmatter and shown in card's header.

## Zettelkasten ID

Key: `id`

Currently, only 14 digits format `%Y%m%d%H%M%S` ([datetime's format](https://www.w3schools.com/python/gloss_python_date_format_codes.asp)) is supported.

## Last modification date

Keys: `date` or `last_update`

The following formats of date strings ([datetime's format](https://www.w3schools.com/python/gloss_python_date_format_codes.asp)) are understood:

- `%Y-%m-%d %H:%M:%S`
- `%Y%m%d%H%M%S`
- `%Y-%m-%d`

When `last_update` key is found in the frontmatter, then it is the value that will be always used as the last modification date for a zettel.

Alternatively, this plugin attempts to convert `id` key to a date in case both `date` and `last_update` keys are missing. As the last resort, the date of site build is used.

Last modification date from the file system or git repository will be used if it is more recent than any date determined so far (with the exception of `last_update` date which always wins).

## Tags

Key: `tags`

List of tags according to [the syntax of yaml array list](https://www.w3schools.io/file/yaml-arrays/)
