Skip to main content

Frontmatter Module

This modules exposes all the frontmatter variables of a file as internal variables.



Function documentation is using a specific syntax. More informations here

Internal Variable / FunctionArgumentsDescriptionExample Output
tp.frontmatter.<frontmatter_variable_name>NoneRetrieves the file's frontmatter variable value.value
  • If your frontmatter variable name contains spaces, you can reference it using the bracket notation like so:

    <% tp.frontmatter["variable name with spaces"] %>


Let's say you have the following file:

alias: myfile
note type: seedling
file content

Then you can use the following template:

File's metadata alias: <% tp.frontmatter.alias %>
Note's type: <% tp.frontmatter["note type"] %>