Adding Frontmatter with Template

Give this a try:

<%_ tp.file.rename(tp.date.now("YYYY-MM-DD")+ " - Daily Note") _%>

<% "---" %>
title: <% tp.date.now("YYYY-MM-DD")+ " - Daily Note" %>
aliases: []
created: <% tp.file.creation_date("dddd, MMMM Do YYYY") %>
modified: <% tp.file.last_modified_date("dddd, MMMM Do YYYY") %>
tags: DailyNote
<% "---" %>
  • Added <%_ and _%> to strip the whitespace above the YAML section.
  • changed title: to <% tp.date.now...

A Templater pro will probably have a better solution, but this seems to work.