Front matter
Notes have their own “front matter”. This is a block of data at the top of the file, with no empty lines between the entries, which is automatically generated at the creation of a new note. The front matter includes the title and keywords (aka “tags” or “filetags”, depending on the file type) which the user specified at the relevant prompt, as well as the date and unique identifier, which are derived automatically.
This is how it looks for Org mode (when denote-file-type is set to the ‘org’ symbol, which is the default):
#+title: This is a sample note
#+date: [2022-06-30 Thu 16:09]
#+filetags: :denote:testing:
#+identifier: 20220630T160934For Markdown with YAML (denote-file-type has the ‘markdown-yaml’ value), the front matter looks like this:
---
title: "This is a sample note"
date: 2022-06-30T16:09:58+03:00
tags: ["denote", "testing"]
identifier: "20220630T160958"
---For Markdown with TOML (denote-file-type has the ‘markdown-toml’ value), it is:
+++
title = "This is a sample note"
date = 2022-06-30T16:10:13+03:00
tags = ["denote", "testing"]
identifier = "20220630T161013"
+++And for plain text (denote-file-type has the ‘text’ value), we have the following:
title: This is a sample note
date: 2022-06-30
tags: denote testing
identifier: 20220630T161028
---------------------------The format of the date in the front matter is controlled by the user option denote-date-format. When nil, Denote uses a file-type-specific format:
- For Org, an inactive timestamp is used, such as ‘
[2022-06-30 Wed 15:31]’. - For Markdown, the RFC3339 standard is applied: ‘
2022-06-30T15:48:00+03:00’. - For plain text, the format is that of ISO 8601: ‘
2022-06-30’.
If the value is a string, ignore the above and use it instead. The string must include format specifiers for the date. These are described in the docstring of format-time-string..