Insert front matter template automatically at file creation time

Is it possible to have a front matter template inserted automatically at file creation time ? For example, each time I create a new note the following templater template should be inserted:

---
aliases: 
tags: 
creation date: <% tp.file.creation_date() %>
modification date: <% tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %>
---

without having to insert it manually by pressing a keyboard shortcut?

In Settings → Files and Links you tell Obsidian where to create new notes.

In Settings → Templater → Folder Templates there is an option to tell Templater which template should be used when a note is created in a specific folder.

Just enter the template settings you want for default notes or for notes in specific folders.

Angel

2 Likes

Thanks for the reply! I think one first has to switch on “Trigger Templater on new file creation” :

The settings section with “Folder templates” will not be visisble unless the first option is switched on :smile: After enabling that switch I now get it:

That was what confused me… :slightly_smiling_face:

1 Like

Good to hear you have it working.

And you are absolutely right: my answer wasn’t comprehensive, and I apologise for that.

Angel

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.